Commit Graph

12 Commits

Author SHA1 Message Date
Erik Johnson
322a988def
Fix paths to moved functions 2018-08-23 08:32:11 -05:00
Erik Johnson
54f9785e6c
[PY3] Add unicode_literals to salt.utils modules (R-S) 2018-01-13 21:14:09 -06:00
Erik Johnson
002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
Erik Johnson
d947ddf176
Move 13 functions from salt.utils to salt.utils.data
These functions are:

- salt.utils.compare_dicts
- salt.utils.compare_lists
- salt.utils.decode_dict
- salt.utils.decode_list
- salt.utils.exactly_n
- salt.utils.exactly_one
- salt.utils.traverse_dict
- salt.utils.filter_by
- salt.utils.traverse_dict_and_list
- salt.utils.subdict_match
- salt.utils.substr_in_list
- salt.utils.is_dictlist
- salt.utils.repack_dictlist
2017-10-10 17:42:42 -05:00
rallytime
03ce4d81b7
Reactor Test: Fix incorrect merge conflict resolution 2017-09-22 15:01:11 -04:00
rallytime
e0ae50e489
Merge branch '2017.7' into 'develop'
Conflicts:
  - pkg/salt.bash
  - salt/client/mixins.py
  - salt/minion.py
  - salt/modules/aptpkg.py
  - salt/modules/boto_vpc.py
  - salt/modules/win_pkg.py
  - salt/utils/reactor.py
  - tests/unit/utils/test_reactor.py
2017-09-22 10:24:04 -04:00
Erik Johnson
4243a2211d Rewrite the reactor unit tests
These have been skipped for a while now because they didn't work
correctly. The old tests have been scrapped in favor of new ones that
test both the old and new config schema.
2017-09-13 10:35:23 -05:00
rallytime
ccf790a83f Update all references for moved functions to use "files" util
- fopen
- flopen
- fpopen
- safe_rm
- is_empty
- is_fcntl_available
2017-07-18 10:31:01 -06:00
Pedro Algarvio
61003bca0a
Take care of resource leakage on tests 2017-04-04 18:58:20 +01:00
Pedro Algarvio
8031ac0209
Move mixins to tests.support.mixins.
The adapted config mixin get config methods are not static methods
2017-04-04 17:29:34 +01:00
Pedro Algarvio
9fd126c904
Use a temporary configuration instead 2017-04-01 18:58:03 +01:00
Pedro Algarvio
f9b58aa2e2
This is not an integration test. Skip test.
Skipping tests since I have no clue what is supposed to be tested here
with that `raise Exception(ret)` at the end.
2017-04-01 14:22:53 +01:00