Commit graph

11803 commits

Author SHA1 Message Date
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
Nicole Thomas
4ae309af6a
Merge pull request #45222 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-02 14:33:07 -05:00
Nicole Thomas
70ccdef729
Merge pull request #45218 from gtmanfred/oxygen
fix up rackspace/openstack cloud test
2018-01-02 11:35:04 -05:00
Gareth J. Greenaway
ba7ff8b2e0
Merge branch 'oxygen' into scheduler_cron_tests 2018-01-01 16:46:02 -08:00
Nicole Thomas
b3e0146ca1
Lint: 2 spaces before comment 2017-12-30 16:10:37 -05:00
Nicole Thomas
cc13a54e21
Merge pull request #45219 from gtmanfred/test_directory
test directory that doesn't exist
2017-12-30 13:11:33 -05:00
Daniel Wallace
1182f250ca
fix up rackspace/openstack cloud test 2017-12-30 11:09:45 -07:00
rallytime
da1e33abea
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - pkg/windows/req_base.txt
  - salt/engines/slack.py
  - salt/modules/cmdmod.py
  - salt/modules/osquery.py
  - salt/modules/pip.py
  - salt/modules/win_pkg.py
  - salt/states/pip_state.py
  - tests/integration/modules/test_cmdmod.py
2017-12-30 08:44:11 -05:00
Nicole Thomas
abed378981
Merge pull request #45204 from garethgreenaway/45176_fixes_to_osquery_module
[2017.7] Fixes to osquery module & addition of unit tests
2017-12-30 08:25:37 -05:00
Nicole Thomas
296cda8e80
Merge pull request #45207 from terminalmage/py3-spm-queues-rosters
[PY3] Add unicode_literals to spm, queues, and rosters
2017-12-30 08:24:30 -05:00
Nicole Thomas
4637a3b43c
Merge pull request #45211 from terminalmage/py3-transport
[PY3] Add unicode_literals to transports
2017-12-30 07:40:51 -05:00
Daniel Wallace
fd6597a2b4
test directory that doesn't exist
sometimes /etc/grub.conf exists and is a symlink to /boot/grub/grub.conf, and
this won't do the right thing.
2017-12-29 10:19:24 -07:00
Nicole Thomas
d595c7af36
Merge pull request #45205 from terminalmage/py3-serializers
[PY3] Add unicode_literals to sdb and serializers
2017-12-28 20:12:31 -05:00
Nicole Thomas
5991d8ca15
Merge pull request #45203 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2017-12-28 20:11:02 -05:00
Gareth J. Greenaway
d834bd1b6f
Fixing some minor lint issues. 2017-12-28 17:07:38 -08:00
Gareth J. Greenaway
4738205154
Fixing a bug when attributes are passed to various osquery module functions. 2017-12-28 17:07:38 -08:00
Erik Johnson
3f85b60077
[PY3] Add unicode_literals to transports 2017-12-28 17:10:42 -06:00
Daniel Wallace
0495c0de7f
enable UsePAM for ssh tests 2017-12-28 15:41:25 -07:00
Erik Johnson
f78c71bd6b
[PY3] Add unicode_literals to spm, queues, and rosters 2017-12-28 15:30:27 -06:00
Gareth J. Greenaway
a9c36b08ff
Gating the cron tests for the scheduler to ensure that the croniter module is installed before we attempt to run these tests 2017-12-28 11:21:18 -08:00
Gareth J. Greenaway
2f4653e271
Adding tests for cron functionality. 2017-12-28 11:21:18 -08:00
Erik Johnson
6f979773b8
[PY3] Add unicode_literals to sdb and serializers
NOTE: the other serializers were done in a previous commit.
2017-12-28 13:18:00 -06:00
rallytime
430c913c8c
Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/auth/pam.py
  - salt/master.py
  - tests/unit/test_target.py
2017-12-28 12:15:54 -05:00
rallytime
a26d4795bd
[2017.7] Fix docstring integration test failure 2017-12-28 10:59:16 -05:00
Nicole Thomas
f093fe1af0
Merge pull request #45095 from terminalmage/py3-loader
PY3: Make loader ignore .pyc files not in __pycache__
2017-12-27 18:23:35 -05:00
Nicole Thomas
42185b79b8
Merge branch 'oxygen' into py3-loader 2017-12-27 13:42:44 -05:00
Erik Johnson
7b13a7df8b
Replace json module usage with a helper to ensure unicode content is handled properly
This adds wrappers for json.dump{,s} which disable `ensure_ascii` by
default.
2017-12-27 09:30:58 -06:00
Erik Johnson
a73c380341
Don't use include-test SLS in orch tests
This was the _actual_ cause of the failing test in the state module
integration tests.
2017-12-24 12:49:45 -06:00
Erik Johnson
4bf072435d
Fix integration.modules.test_state.StateModuleTest.test_exclude
test_exclude shares file paths with test_include, and while I can't
reproduce the failures, it is likely that improperly cleaned-up files
from test_include are causing the failures in test_exclude. This is
backed up by the fact that the state.sls return data from the
salt-runtests.log shows no trace of the "to-include-test" file
(suggesting it was excluded as expected), yet os.path.isfile() returns
True for this path, causing the test to fail.

This commit uses a distinct base dir for both tests, which should keep
this sort of failure from happening.
2017-12-24 12:08:57 -06:00
Erik Johnson
d9a915fdc9
Update mocking in unit.grains.test_core.CoreGrainsTestCase.test_docker_virtual
This fixes this test in Oxygen, where the function name has changed.
2017-12-23 19:47:37 -06:00
Gareth J. Greenaway
48eafe3206
Adding some tests to tests cmd.script with cwd 2017-12-21 15:53:38 -08:00
rallytime
9ded5e1cbb
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/config/__init__.py
  - salt/grains/core.py
  - salt/modules/win_lgpo.py
  - salt/returners/mysql.py
  - salt/states/libcloud_dns.py
  - tests/integration/runners/test_runner_returns.py
  - tests/unit/grains/test_core.py
2017-12-21 15:58:08 -05:00
Nicole Thomas
b49ee97938
Merge pull request #45124 from gtmanfred/2017.7
enable using kitchen-salt with ec2 on 2017.7
2017-12-21 14:11:27 -05:00
Daniel Wallace
d0586013eb
fix pylint 2017-12-21 10:40:54 -07:00
Gareth J. Greenaway
98a9ddf10c
Merge branch 'oxygen' into scheduler_fixes_loop_interval 2017-12-21 08:36:09 -08:00
Gareth J. Greenaway
0ff811de70
Swapping import to be the old path for 2016.11 2017-12-21 08:17:53 -08:00
Daniel Wallace
59e2e56d13
chmod the xml files before trying to copy 2017-12-21 08:17:10 -07:00
Daniel Wallace
a5c1410e23
catch IOError when copying xml files back 2017-12-20 18:26:18 -07:00
Gareth J. Greenaway
b3e2f388f5
Fix to allow nodegroups to include sequences 2017-12-20 16:56:16 -08:00
Daniel Wallace
23bd38ad66
enable using kitchen-salt on ec2
These changes are needed to run the test suite on ec2 using sudo.
2017-12-20 17:18:39 -07:00
Nicole Thomas
42e894570d
Merge pull request #45087 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2017-12-20 17:24:50 -05:00
Nicole Thomas
21de54de44
Merge pull request #45105 from rallytime/utils-path-update
Update old utils paths to new paths
2017-12-20 17:22:29 -05:00
Ch3LL
1bd7110a14
Fix spm big file build test to check /tmp 2017-12-20 14:40:10 -05:00
rallytime
fe81e2d39a
Merge branch '2016.11' into '2017.7'
No conflicts.
2017-12-20 10:26:10 -05:00
Erik Johnson
8c360dd3fb
Revert "Clear Python 2 .pyc files when Python 3 suite runs"
This reverts commit 7a60cfd171.
2017-12-20 08:39:41 -06:00
rallytime
ec2a32a106
Update old utils paths to new paths 2017-12-20 08:03:14 -05:00
Michael Calmer
744e698689
adapt tests to reflect reality
When CherryPy run with python3 it reads "bytes" from the wire.
In case of python2 BytesIO == StringIO, so nothing should change.

This change will do the same to make unit tests reflect reality.
2017-12-20 06:59:56 -05:00
Erik Johnson
80b6bd6813
Fix integration.states.test_pip.PipStateTest.test_pip_installed_weird_install
Carbon 1.1.1 for some reason added six to their setup.py, which breaks
this test since it's not installed into the virtualenv. This PR forces
this test to use a version of carbon which does not dep on six in its
setup.py.
2017-12-20 06:54:30 -05:00
Nicole Thomas
dafd2fc61f
Merge pull request #45083 from Ch3LL/gce_test_fix
Force gce cloud test name to be lowercase
2017-12-20 06:46:23 -05:00
Nicole Thomas
19997e4d81
Merge pull request #45092 from terminalmage/fix-pip-test
Fix integration.states.test_pip.PipStateTest.test_pip_installed_weird_install
2017-12-20 05:52:08 -05:00