Commit Graph

581 Commits

Author SHA1 Message Date
Erik Johnson
0ff41c5835
Add regression test for issue 45893 2018-02-09 11:40:22 -05:00
Daniel Wallace
e892f75660
fix digital ocean tests 2018-02-07 14:04:37 -07:00
Erik Johnson
6cef37f310
2 unicode-compatibility fixes for cmdmod.py
First, `shlex.split()` will raise an exception when passed a unicode
type with unicode characters in the string. This modifies our
`shlex.split()` helper to first convert the passed string to a `str`
type, and then return a decoded copy of the result of the split.

Second, this uses our `to_unicode` helper to more gracefully decode the
stdout and stderr from the command. Unit tests have been added to
confirm that the output is properly decoded, including instances where
decoding fails because the return from the command contains binary data.
2018-02-07 02:01:55 -06:00
Erik Johnson
0d92e0a868
Add a test for issue 40578 2018-01-30 09:51:51 -06:00
Nicole Thomas
d48230a9e6
Merge pull request #45582 from terminalmage/salt-ssh-fixes
Two salt-ssh fixes
2018-01-22 07:31:43 -05:00
Erik Johnson
2817101041
Further fixes to for salt-ssh test under heavy load
This makes some further tweaks to make the test more stable under heavy
load. Firstly, the background job sleeps longer, and secondly, we make
up to 3 attempts run state.running instead of just the one, in case our
first attempt was too early. It also uses threading to make the job
sleep, since the method of adding a & to the command seemed to be
producing intermittent failures with returning clean JSON.
2018-01-21 21:19:53 -06:00
Erik Johnson
c27bb7c116
[PY3] Update fileserver for Unicode/PY3 compatibility
This adds a unicode_literals import to the fileserver code, and also ensures
that we return unicode paths from the serialized file/env list caches
(which when deserialized are still encoded str types on PY2).

It also adds a test and modifies a few other existing tests to confirm
that unicode paths/envs are returned *as unicode* in the return data.
2018-01-20 22:25:23 -06:00
Nicole Thomas
4d03162227
Merge pull request #45396 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-14 07:44:37 -05:00
Ch3LL
62035a04ff
update provider rackspace config 2018-01-12 12:02:01 -05:00
Ch3LL
40677cad21
migrate rackspace to openstack in cloud test 2018-01-12 11:08:28 -05:00
Ch3LL
f7cf8b6e94
Change rackspace provider name for >=oxygen cloud tests 2018-01-12 10:55:31 -05:00
rallytime
60370f5fb6
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - salt/config/__init__.py
  - salt/daemons/masterapi.py
  - salt/proxy/dummy.py
  - salt/states/file.py
  - tests/integration/modules/test_state.py
  - tests/integration/runners/test_runner_returns.py
  - tests/integration/ssh/test_state.py
  - tests/support/parser/__init__.py
  - tests/unit/grains/test_core.py
  - tests/unit/states/test_file.py
2018-01-11 16:00:08 -05:00
Nicole Thomas
2340f0b487
Merge pull request #45380 from twangboy/backport_45308
Backport changes from #45308
2018-01-11 14:45:20 -05:00
Daniel Wallace
3cb91b4d63
disable discovery in test suite 2018-01-11 09:58:14 -07:00
twangboy
419be8a9b5
Backport changes from #45308 2018-01-10 11:16:59 -07:00
Erik Johnson
3565bc2bf2
Don't use include-test SLS in orch tests
This was the _actual_ cause of the failing test in the state module
integration tests.
2018-01-10 10:29:15 -05:00
Erik Johnson
8bc17e0d7a
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.
2018-01-10 10:29:15 -05:00
twangboy
e3e0dba15d
Fix failing ubuntu test 2018-01-09 21:30:51 -07:00
twangboy
53506a5e86
Fix some additional tests
- Fix problem with invalid characters in requisites.prereq_simple2
- Fix problem with true/false commands in Windows. Need to use exit
- Fix some issues with hard-coded paths to /tmp
2018-01-09 16:50:29 -07:00
Nicole Thomas
8d04c2b3d4
Merge pull request #44856 from Ch3LL/running_test
Add state.running ssh integration test
2018-01-08 16:40:49 -05:00
Erik Johnson
0d975c335d
Add unicode_literals to engines 2018-01-07 14:01:48 -06:00
rallytime
a3d251b2cd
Merge branch '2016.11' into '2017.7' 2018-01-02 15:21:58 -05:00
Daniel Wallace
2d0a9bbf7e
enable UsePAM for ssh tests 2018-01-02 12:29:43 -05: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
Daniel Wallace
0495c0de7f
enable UsePAM for ssh tests 2017-12-28 15:41:25 -07:00
rallytime
a26d4795bd
[2017.7] Fix docstring integration test failure 2017-12-28 10:59:16 -05: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
rallytime
fe81e2d39a
Merge branch '2016.11' into '2017.7'
No conflicts.
2017-12-20 10:26:10 -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
Erik Johnson
109c9936d3
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-19 18:37:59 -06:00
Erik Johnson
8cdb9ea54f
[PY3] Add print_function import to files with unicode_literals already added
This makes the 2.x usage invalid syntax and forces the use of print as a
function. This adds the import to the files which I've updated in the
last couple of days but forgot to add it.
2017-12-15 12:14:18 -06:00
Nicole Thomas
e631ce1276
Merge pull request #45030 from terminalmage/moar-unicode
[PY3] Add unicode_literals to tops, thorium, proxy, tokens
2017-12-15 12:04:05 -05:00
Erik Johnson
239fc8d774
[PY3] Add unicode literals to the clients and associated files/tests 2017-12-15 00:19:55 -06:00
Erik Johnson
7147ac69ac
Add unicode_literals to tops, thorium, proxy, tokens 2017-12-14 21:56:49 -06:00
rallytime
08c71f13e4
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - doc/ref/configuration/minion.rst
  - doc/topics/thorium/index.rst
  - salt/beacons/__init__.py
  - salt/client/mixins.py
  - salt/client/ssh/wrapper/state.py
  - salt/daemons/masterapi.py
  - salt/grains/extra.py
  - salt/minion.py
  - salt/modules/cron.py
  - salt/modules/file.py
  - salt/modules/mac_user.py
  - salt/modules/napalm_network.py
  - salt/modules/state.py
  - salt/modules/win_file.py
  - salt/modules/win_pkg.py
  - salt/proxy/dummy.py
  - salt/state.py
  - salt/states/file.py
  - salt/states/lxc.py
  - salt/utils/__init__.py
  - salt/utils/schedule.py
  - tests/integration/modules/test_file.py
  - tests/integration/modules/test_groupadd.py
  - tests/integration/ssh/test_state.py
  - tests/integration/states/test_file.py
  - tests/unit/daemons/test_masterapi.py
  - tests/unit/grains/test_core.py
  - tests/unit/modules/test_disk.py
  - tests/unit/modules/test_napalm_network.py
  - tests/unit/modules/test_state.py
  - tests/unit/test_minion.py
  - tests/unit/utils/test_process.py
2017-12-11 18:24:41 -05:00
Nicole Thomas
95d9eb5744
Merge pull request #44324 from benediktwerner/accept-minions-from-grains
Automatically accept minion keys based on grains
2017-12-08 09:02:01 -05:00
Ch3LL
aeb5f4e248
Add state.running ssh integration test 2017-12-06 13:23:55 -05:00
Erik Johnson
ce13d8f2e6
Update busybox image script to include /etc/{passwd,group,shadow}
These are necessary to make sure users work
2017-12-06 12:12:25 -06:00
Erik Johnson
ee3486a671
Include failed state/function orchestration results in changes dict
Before this commit they would be in the comment, making it difficult to
programatically analyze the failures.
2017-12-05 00:56:05 -06:00
Nicole Thomas
0697ed0645
Merge branch 'develop' into accept-minions-from-grains 2017-12-04 16:10:32 -05:00
Nicole Thomas
97ec0e6ea0
Merge branch '2017.7' into ssh_pillar_items 2017-11-29 09:39:38 -05:00
Erik Johnson
18905cf32b
Add integration test for triggering orchestration failure via context 2017-11-28 22:03:11 -06:00
Ch3LL
c7f5af1274
Add pillar ssh integration tests 2017-11-28 12:19:41 -05:00
Nicole Thomas
f6a72acfe3
Merge branch '2017.7' into mine_ssh 2017-11-27 17:01:51 -05:00
Nicole Thomas
f2f6817e86
Merge pull request #44608 from Ch3LL/ssh_jinja
Add jinja to ssh sls test file
2017-11-27 17:00:27 -05:00
Ch3LL
f90b4f7653
Add salt-ssh mine.get integration test 2017-11-27 16:38:19 -05:00
Nicole Thomas
7adc0b5b6f
Merge pull request #43893 from olivier-mauras/saltclass
SaltClass: Correct when dict is NoneType because of the value doesn't exist
2017-11-27 16:24:25 -05:00
Nicole Thomas
5ec7ea0bb5
Merge pull request #44572 from Ch3LL/watchin_test
Add watch_in integration test
2017-11-27 15:52:31 -05:00
rallytime
052b13c98e
Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/cli/daemons.py
  - salt/client/ssh/__init__.py
  - salt/modules/win_pkg.py
  - salt/netapi/rest_cherrypy/app.py
  - salt/proxy/fx2.py
  - salt/utils/__init__.py
  - salt/utils/jinja.py
  - salt/utils/napalm.py
  - salt/utils/path.py
  - salt/utils/verify.py
  - tests/integration/modules/test_saltutil.py
  - tests/integration/states/test_service.py
  - tests/unit/utils/test_verify.py
2017-11-22 12:36:03 -05:00