Commit Graph

12063 Commits

Author SHA1 Message Date
Nicole Thomas
fc0af9b2cf
Merge pull request #45491 from terminalmage/py3-encode-decode
Improve PY3 compatibility of salt.utils.data.decode and encode
2018-01-21 19:10:56 -05:00
Erik Johnson
033f34ee21
Fix failing boto/network tests
These failures were recently introduced but went undiscovered due to
some recent instability in the test suite (which has now been fixed).

This commit fixes these failing tests.
2018-01-21 17:24:11 -06:00
Nicole Thomas
37f60b1a4b
Merge branch 'oxygen' into unicode-e 2018-01-21 17:56:39 -05:00
Nicole Thomas
be36ee8749
Merge branch 'oxygen' into win_fix_test_process 2018-01-21 17:54:55 -05:00
Nicole Thomas
1a25ceca65
Merge pull request #45531 from terminalmage/py3-pkg
[PY3] Add unicode_literals to pkg/pkgrepo states/modules
2018-01-21 17:52:41 -05:00
Nicole Thomas
ccefc34a79
Merge pull request #45361 from terminalmage/py3-fileserver
[PY3] Update fileserver for Unicode/PY3 compatibility
2018-01-21 17:51:13 -05:00
Daniel Wallace
f7fd35fc4a
test updating the minion blackout timeout to 10 seconds 2018-01-21 14:42:56 -07:00
rallytime
9effd08bb3
Add unicode_literals to modules, states, tests (I) 2018-01-21 09:27:14 -05:00
rallytime
4b47e8e75a
Add unicode_literals to modules, states, tests (E) 2018-01-21 09:25:58 -05:00
Erik Johnson
2926834423
Improve robustness of daemons unit tests
https://github.com/saltstack/salt/pull/45583 was opened to fix some test
failures in the daemons tests. However, with the way that the tests were
written, `_multiproc_exec_test` was waiting for a response from the
child function, which would never come due to the error raised during
the test. This means that any exception raised during the test would
stop the test suite dead in its tracks, causing it to eventually end in
a timeout.

This commit addresses this design flaw by wrapping the test logic in a
try/except, and ensuring that we always return a response from the child
function. The tests will instead log the exception and gracefully fail
the test, allowing whomever troubleshoots the failures to consult the
salt-runtests.log to see the traceback.
2018-01-20 22:49:02 -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
Erik Johnson
441e9dabd1
Improve PY3 compatibility of salt.utils.data.decode and encode
This adds the ability to specify the encoding and error behavior. It
also adds the "errors" argument to the salt.utils.stringutils funcs for
converting between str, unicode, and bytes.

Tests have also been updated to properly test the recursive behavior of
salt.utils.data.decode/encode.
2018-01-20 22:22:34 -06:00
Erik Johnson
9df3dab883
[PY3] Add unicode_literals to pkg/pkgrepo states/modules 2018-01-20 22:21:41 -06:00
Erik Johnson
83acd43294
Fix mocked logger in daemons tests
This was not caught when the daemons had their logging switched to using
string formatting instead of str.format()
2018-01-20 22:09:54 -06:00
Daniel Wallace
bd3cb47fa7
fix mock for opensuse
Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
2018-01-20 09:58:22 -07:00
Daniel Wallace
808e26e69a
test simple website 2018-01-20 09:57:20 -07:00
Daniel Wallace
1f71f301ba
specify checking man page path
Without setting the man path, this would be checking that the installed salt
package used to bootstap has an spm man page, which is possible that it
doesn't, and also not what we want to check
2018-01-19 17:53:20 -07:00
twangboy
5f59c1573e
Fix issue caused by unicode literals 2018-01-19 22:58:06 +00:00
Daniel Wallace
0ba39a7108
switch systemd-journald for sshd for arch service test
the running tests run second because of alphabetical order, and stopping sshd
does not kill off the running connection, so we know that sshd has to be on
arch for us to connect, so stop it with dead and start it back with running.

It is also not possible to stop the systemd-journald process without shutting
down the full machine.
2018-01-19 15:17:53 -07:00
twangboy
8f2332f45c
Mock sys.platform so the test runs on Windows 2018-01-19 22:15:13 +00:00
twangboy
a9212f9927
remove regex_path variable 2018-01-19 21:37:20 +00:00
twangboy
fe9b35181a
Fix regex statement
The path seperator in Windows is an escape character in regex
2018-01-19 21:28:01 +00:00
Nicole Thomas
4fdb5cb135
Merge pull request #45419 from garethgreenaway/oxygen_updating_utils_for_unicode_round_three
[oxygen] Oxygen updating utils and related tests for Unicode round three
2018-01-19 16:23:56 -05:00
Nicole Thomas
061c7e3bcb
Merge pull request #45536 from twangboy/win_fix_test_configparser
Fix `unit.utils.test_configparser` for Windows
2018-01-19 15:14:58 -05:00
Nicole Thomas
4cfc66ad57
Merge branch 'oxygen' into oxygen_updating_utils_for_unicode_round_three 2018-01-19 10:21:37 -05:00
rallytime
e0ffa32b49
Merge branch '2016.11' into '2017.7'
Conflicts:
  - tests/integration/modules/test_pkg.py
2018-01-19 10:09:36 -05:00
Nicole Thomas
bef1e070aa
Merge pull request #45338 from twangboy/win_fix_test_ansiblegate
Fix `unit.modules.test_ansiblegate` for Windows
2018-01-19 09:21:38 -05:00
Nicole Thomas
b3dc758ab0
Merge pull request #45483 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-01-18 17:54:11 -05:00
Daniel Wallace
8d907ee1a0
fix moto version
Fixes saltstack/salt-jenkins#692
2018-01-18 14:56:31 -07:00
Daniel Wallace
1241ab5fc6
fix test boto imports
Test boto imports are failing for some reason
2018-01-18 14:56:27 -07:00
Daniel Wallace
f4b6367cf9
fix fedora pkg test
yum is no longer installed by default on fedora.  apparently it has been
removed from the base installs, and only dnf is available.  Stop depending on
the pkg manager, and just use bash.
2018-01-18 14:54:54 -07:00
twangboy
93aec6fbd9
Fix decode issue on Py2, Use os.linesep 2018-01-18 20:45:40 +00:00
twangboy
50859057ed
Skip tests on Windows, gate module on Windows 2018-01-18 13:27:56 -07:00
twangboy
176d3aab62
Revert one more indent 2018-01-18 13:27:56 -07:00
twangboy
38c2ce2fa0
Revert indents 2018-01-18 13:27:55 -07:00
twangboy
f72e7c28f2
Revert imports 2018-01-18 13:27:55 -07:00
twangboy
fbb4e712e7
revert changes to unittest 2018-01-18 13:27:55 -07:00
twangboy
3126af7661
Fix patch indenting, remove :returns: 2018-01-18 13:27:55 -07:00
twangboy
18bc68939c
Fix broken tests, use correct assert functions 2018-01-18 13:27:54 -07:00
twangboy
2dea2f16a9
Remove salt.utils.platform import 2018-01-18 19:13:33 +00:00
twangboy
2859be5d57
Fix mock, fix paths 2018-01-18 19:07:50 +00:00
Daniel Wallace
6c26025664
fix mock for opensuse
Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
2018-01-18 10:48:07 -07:00
Nicole Thomas
33e81c7cbf
Merge pull request #45515 from twangboy/win_fix_test_jinja
Fix `unit.templates.test_jinja` for Windows
2018-01-18 11:01:49 -05:00
Nicole Thomas
8123025a3b
Merge pull request #45512 from terminalmage/py3-b
[PY3] Update modules/states for PY3/Unicode compatibility (B)
2018-01-18 10:53:58 -05:00
Nicole Thomas
bd891ee13a
Merge pull request #45405 from garethgreenaway/oxygen_updating_utils_for_unicode_round_one
[oxygen] Updating various utils and related tests for Unicode goodness.
2018-01-18 10:39:55 -05:00
Daniel Wallace
5455d2dee6
fix centos 6 pip test
flake8 is having problems installing on python2.6, switching to different
module that still works easily on python 2.6
2018-01-17 22:41:06 -07:00
Daniel Wallace
40255194b0
fix fedora pkg test
yum is no longer installed by default on fedora.  apparently it has been
removed from the base installs, and only dnf is available.  Stop depending on
the pkg manager, and just use bash.
2018-01-17 21:35:41 -07:00
Erik Johnson
e0890baa31
Use correct attribute in test_log_created 2018-01-17 19:54:47 -06:00
Erik Johnson
2ab1e71ef2
[PY3] Add unicode_literals to salt.utils modules (P) 2018-01-17 19:54:44 -06:00
twangboy
4517ca72b9
Ensure utf-8 encoding 2018-01-17 16:22:44 -07:00
Erik Johnson
4ca7931655
[PY3] Update modules/states for PY3/Unicode compatibility (B)
This includes all the boto modules
2018-01-17 17:06:07 -06:00
Gareth J. Greenaway
f724c579d2
Merge branch 'oxygen' into oxygen_updating_utils_for_unicode_round_one 2018-01-17 12:51:38 -08:00
Gareth J. Greenaway
a68ff09084
Merge branch 'oxygen' into oxygen_updating_utils_for_unicode_round_three 2018-01-17 12:51:34 -08:00
Frode Gundersen
ccf062d62e
fix test_archive test for mac on 2017.7 branch 2018-01-17 18:54:35 +00:00
rallytime
de6d85959a
Lint fix 2018-01-17 12:42:38 -05:00
Nicole Thomas
12a899cfb9
Merge pull request #45463 from rallytime/fix-unit-file-test
Change "to_str" to "to_bytes": needed when opening a file in bytes mode
2018-01-17 12:38:11 -05:00
Gareth J. Greenaway
a773ff90e5
More unicode changes. Adding print_function to all files. Updating various reads & writes to files. 2018-01-17 09:03:14 -08:00
Gareth J. Greenaway
a79112cc91
Updating more utils and tests for Unicode goodness 2018-01-17 09:03:14 -08:00
Gareth J. Greenaway
e14b655c01
More unicode changes. Adding print_function to all files. Updating various reads & writes to files. 2018-01-17 09:02:17 -08:00
Gareth J. Greenaway
db41d9b303
Updating various utils and related tests for unicode goodness. 2018-01-17 09:02:17 -08:00
Nicole Thomas
4803fef51a
Merge pull request #44648 from isbm/isbm-bsc1068446-develop
DoubleBugfix: a) errors in external pillar causes crash, b) highstate crashes on certain SLS scenarios
2018-01-17 10:58:34 -05:00
Bo Maryniuk
29b67b3b18 Refactor unit tests so they call class-based decorator 2018-01-17 14:13:25 +01:00
rallytime
9f547a31f0
Merge branch '2016.11' into '2017.7' 2018-01-16 17:19:08 -05:00
Nicole Thomas
5f58a87e84
Merge pull request #45365 from meaksh/2017.7-issue-45345
Return an error when "gid_from_name" is set but group does not exist
2018-01-16 13:31:49 -05:00
Bo Maryniuk
dbe7c01ed6 Update integration test: docs, add more checks, rename 2018-01-16 18:13:00 +01:00
rallytime
9e7aeb5e02
Change "to_str" to "to_bytes": needed when opening a file in bytes mode
References: https://github.com/saltstack/salt/pull/45357
2018-01-16 10:41:46 -05:00
Nicole Thomas
de080983e3
Merge pull request #44822 from frogunder/pkg_latestversion
add pkg_latest_version test
2018-01-16 09:16:53 -05:00
rallytime
590a6db626
Lint: use support TMP path instead of integration TMP path 2018-01-16 09:13:27 -05:00
Bo Maryniuk
d0c54f43cc Git rebase spaghetti fix 2018-01-15 15:36:06 +01:00
Bo Maryniuk
5ca5046822 Refactor and rename tests while function has been renamed 2018-01-15 15:34:46 +01:00
Bo Maryniuk
6802593a5a Lintfix: E8302 2018-01-15 15:34:13 +01:00
Bo Maryniuk
1133e0c35d Lintfix: W0611 2018-01-15 15:34:13 +01:00
Bo Maryniuk
b3c3b8c679 Lintfix: E0102 2018-01-15 15:34:13 +01:00
Bo Maryniuk
a228ed5ddf Add unit test to unify result converted to false 2018-01-15 15:34:13 +01:00
Bo Maryniuk
48b9a70901 Fix unit test docstring 2018-01-15 15:33:49 +01:00
Bo Maryniuk
8de1301e2d Add unit test for result is converted to a True boolean type 2018-01-15 15:33:49 +01:00
Bo Maryniuk
4e9a5b8033 Fix docstrings 2018-01-15 15:33:21 +01:00
Bo Maryniuk
d9b4ac2d6d Test only comment section conversion 2018-01-15 15:33:21 +01:00
Bo Maryniuk
ac63d35703 Remove leftovers of the old unit test 2018-01-15 15:24:46 +01:00
Bo Maryniuk
e09c21bb8d Add unit test to unify an output data from the state 2018-01-15 15:24:46 +01:00
Bo Maryniuk
a976d1445e Add unit test to ensude there is "name", "result" and "comment" in the state output. 2018-01-15 15:24:20 +01:00
Bo Maryniuk
a9ba5a3fe3 Add unit test checking the entire return is of a dictionary type 2018-01-15 15:23:44 +01:00
Bo Maryniuk
014167c640 Add unit test for checking policy so the "changes" keyword contains a dictionary type 2018-01-15 15:23:08 +01:00
Bo Maryniuk
5902633b3f Remove obsolete unit test code 2018-01-15 15:21:19 +01:00
Bo Maryniuk
fa96d8c528 Use PyTest in tests 2018-01-15 15:20:51 +01:00
Bo Maryniuk
0949c39271 Add unit test for _get_pillar_errors when external pillar has errors and internal is clean 2018-01-15 15:20:50 +01:00
Bo Maryniuk
6ed4262589 Add unit test for _get_pillar_errors when external and internal pillars are clean 2018-01-15 15:20:50 +01:00
Nicole Thomas
53b25752a4
Merge branch 'oxygen' into py3-cache-cli 2018-01-14 16:35:59 -05:00
Erik Johnson
919e92c911
Fix git.latest failure when rev is not the default branch 2018-01-14 08:25:30 -05:00
Erik Johnson
c081b2c62c
Fix git.latest failure when rev is not the default branch 2018-01-14 08:23:38 -05:00
Nicole Thomas
c00fddd5bb
Merge pull request #45357 from twangboy/win_fix_test_file
Fix `unit.modules.test_file` for Windows
2018-01-14 08:14:24 -05:00
Nicole Thomas
e8e82f2f7f
Merge pull request #45429 from terminalmage/py3-salt.utils-r-s
[PY3] Add unicode_literals to salt.utils modules (R-S)
2018-01-14 08:06:51 -05:00
Nicole Thomas
80f6815c11
Merge pull request #45439 from terminalmage/py3-salt.utils-w-z
[PY3] Add unicode_literals to salt.utils modules (W-Z)
2018-01-14 08:02:22 -05:00
Nicole Thomas
78ce60e4d4
Merge pull request #44977 from terminalmage/remove-more-explicit-unicode-literals
Remove more unnecessary explicit unicode literals
2018-01-14 07:55:29 -05:00
Nicole Thomas
b90e7aedde
Merge pull request #45440 from terminalmage/py3-a
[PY3] Add unicode_literals to states/modules (A)
2018-01-14 07:52:02 -05: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
Erik Johnson
ce6fccde9c
[PY3] Add unicode_literals to states/modules (A) 2018-01-14 01:31:52 -06:00
Erik Johnson
54f9785e6c
[PY3] Add unicode_literals to salt.utils modules (R-S) 2018-01-13 21:14:09 -06:00
Erik Johnson
b89efc16eb
Remove more unnecessary explicit unicode literals 2018-01-13 21:10:04 -06:00
Erik Johnson
42d2b1d719
Python 3 doesn't have 'u' before unicode strings 2018-01-13 21:08:51 -06:00