Erik Johnson
c34a6f72cd
SSDP PY3 compatibility fixes
2018-01-28 11:09:20 -06:00
Nicole Thomas
2969d86237
Merge pull request #45735 from terminalmage/shellcase-debug-logging
...
Add debug logging to ShellCase functions
2018-01-28 08:27:20 -05:00
Nicole Thomas
cc32a641b4
Merge pull request #45731 from terminalmage/arch-tests
...
Fix groupadd tests for Arch Linux
2018-01-28 08:25:13 -05:00
Nicole Thomas
87a187da11
Merge pull request #45729 from terminalmage/tests
...
Python 3 comptibility fixes
2018-01-28 08:24:25 -05:00
Erik Johnson
1cabf31a1f
Add debug logging to ShellCase functions
...
Some of these have been failing in ways which are not reproducible
locally. This adds debug logging so that we can check the
salt-runtests.log for the return data, to aid in troubleshooting.
NOTE: This also contains a fix for a bug in the CLI output handler that
I think may have a chance of fixing some of these odd failures.
2018-01-27 20:55:34 -06:00
Erik Johnson
f60183b95c
Use bytestrings for struct.pack/unpack
...
https://github.com/saltstack/salt/pull/45687 and
https://github.com/saltstack/salt/pull/45725 fixed problems with older
Python 2 versions interacting with the struct module, since
unicode_literals turned the format strings to unicode and older Python 2
releases can't accept a unicode format string. Since Python 2 and 3 both
support using bytestrings for the format strings, this commit makes sure
we are using bytestrings everywhere else we are using struct.pack/unpack.
2018-01-27 17:34:16 -06:00
Erik Johnson
227fcbf794
Fix groupadd tests for Arch Linux
...
The default /etc/login.defs does not have a value assigned to MOTD_FILE,
which causes a traceback in 2 of the tests.
2018-01-27 17:02:23 -06:00
Erik Johnson
604ac80e7f
PY3-compatibility fix after unicode_literals was enabled
2018-01-27 16:30:29 -06:00
Erik Johnson
b1ae012852
Remove unnecessary additional assert
...
It looks like this was just written to assert the output of a failed
call to `ip.down`, which raises a KeyError at this point of the test
because it is not within the `with` block in which this function is
mocked.
2018-01-27 16:30:29 -06:00
Erik Johnson
e2b8ec9255
Merge pull request #45713 from isbm/isbm-oxygen-unicode-S3171
...
Move to unicode (3rd tier, tests)
2018-01-27 15:44:08 -06:00
Erik Johnson
c1b367dcb0
Merge pull request #45717 from isbm/isbm-oxygen-unicode-S3173
...
Move to unicode (3rd tier, tests)
2018-01-27 15:43:21 -06:00
Erik Johnson
7115cd9d39
Don't import text_type directly so it doesn't get added to lazyloader
2018-01-27 14:50:16 -06:00
Erik Johnson
fbcd9f1ef0
Merge branch 'isbm-3136-unittests-to-discovery' of https://github.com/isbm/salt into isbm-isbm-3136-unittests-to-discovery
2018-01-27 14:48:35 -06:00
rallytime
0ea728bd06
Update old utils paths to new paths
2018-01-26 17:34:29 -05:00
rallytime
0ad101d560
Merge branch '2017.7' into 'oxygen'
...
Conflicts:
- doc/man/salt.7
- salt/modules/git.py
- salt/modules/pacman.py
- salt/states/git.py
- tests/integration/modules/test_mac_user.py
- tests/support/parser/__init__.py
2018-01-26 17:27:03 -05:00
Erik Johnson
fe9131e566
Fix unit.modules.test_inspect_fsdb.InspectorFSDBTestCase.test_create_table for PY3
...
This was broken when I fixed the test for PY2. The types for unicode
strings in PY3 are of course `str` and not `unicode`.
2018-01-26 11:19:15 -06:00
Erik Johnson
fa37509d1f
Fix several shadow tests for PY3
...
The recent unicode_literals changes broke PY3 when generating a password
using random bytes from pycryto/Cryptodome, this catches the failure to
decode and skips until we get a decodable byte.
2018-01-26 11:19:15 -06:00
Erik Johnson
b0f2a51752
Fix unit.modules.test_hosts.HostsTestCase.test_set_host_true_remove for PY3
2018-01-26 09:54:21 -06:00
Bo Maryniuk
2839c089ac
Restore accidentally broken test
2018-01-26 15:31:29 +01:00
Bo Maryniuk
8e7a4da5e8
Remove extra-parenthesis
2018-01-26 15:26:34 +01:00
Bo Maryniuk
042d5b075d
Remove extra backslashes
2018-01-26 15:26:24 +01:00
Bo Maryniuk
f663c6f5e5
Lintfix: line too long
2018-01-26 15:26:04 +01:00
Bo Maryniuk
6c8929147e
Lintfix: continuation
2018-01-26 15:25:49 +01:00
Bo Maryniuk
657db52302
Fix docstrings
2018-01-26 15:25:14 +01:00
Bo Maryniuk
11130f7d9d
Fix unicode strings
2018-01-26 15:24:31 +01:00
Bo Maryniuk
876f968263
Add print_function and unicode_literals
2018-01-26 15:23:44 +01:00
Nicole Thomas
ddae2d611e
Merge pull request #45696 from twangboy/win_fix_tests
...
Fix stacktrace at the end of a test
2018-01-26 09:20:55 -05:00
Bo Maryniuk
2acff9d49d
Fix docstring
2018-01-26 15:01:01 +01:00
Bo Maryniuk
5d84ce1856
Add TODO remark on possible removal of the unicode-test tests
2018-01-26 15:00:51 +01:00
Bo Maryniuk
6b71bf9204
Remove extra backslashes
2018-01-26 15:00:33 +01:00
Bo Maryniuk
791d9a8761
Fix log formatting
2018-01-26 15:00:12 +01:00
Bo Maryniuk
63cf21730c
Remove garbage code
2018-01-26 14:59:57 +01:00
Bo Maryniuk
2c2be36647
Use parenthesis for multiline imports
2018-01-26 14:59:30 +01:00
Bo Maryniuk
d1f7e4753a
Fix iterations over dict items
2018-01-26 14:59:04 +01:00
Bo Maryniuk
7362a55064
Lintfix: continuation
2018-01-26 14:58:46 +01:00
Bo Maryniuk
9778958d26
Lintfix: line too long
2018-01-26 14:58:11 +01:00
Bo Maryniuk
764534f685
Add print_function and unicode_literals
2018-01-26 14:57:36 +01:00
Nicole Thomas
4697769d0b
Merge pull request #44962 from DSRCorporation/m2crypto
...
Migrate to M2crypto
2018-01-26 08:54:04 -05:00
Bo Maryniuk
a0baa21de9
Lintfix: continuation
2018-01-26 14:12:11 +01:00
Bo Maryniuk
fb7c5aa0a8
Lintfix: extra parenthesis
2018-01-26 14:11:50 +01:00
Bo Maryniuk
395edcd573
Remove extra back-slashes
2018-01-26 14:11:28 +01:00
Bo Maryniuk
9319b2b450
Lintfix: continuation
2018-01-26 14:11:01 +01:00
Bo Maryniuk
cfdb92be67
Lintfix: PEP8 - line too long
2018-01-26 14:10:43 +01:00
Bo Maryniuk
558c943602
Fix str() function
2018-01-26 14:10:20 +01:00
Bo Maryniuk
274135ae5e
Add unicode_literals and print_function
2018-01-26 14:09:58 +01:00
Bo Maryniuk
b4c5d66637
Add print_function import
2018-01-26 13:43:11 +01:00
Bo Maryniuk
b013fa8dc1
Remove unnecessary backslashes
2018-01-26 13:30:07 +01:00
Bo Maryniuk
84c08dd32b
Lintfix: fix doc ident
2018-01-26 13:30:00 +01:00
Bo Maryniuk
87f8538c4d
Add unicode_literals
2018-01-26 13:29:40 +01:00
Bo Maryniuk
fe99de3c0c
Replace usage of str() forcing to unicode
2018-01-26 10:34:31 +01:00
Bo Maryniuk
f0c8839c1a
Lintfix C0201: remove .keys() method
2018-01-26 10:34:31 +01:00
Bo Maryniuk
6144786fa8
Lintfix: W1699 (Python3 incompatibility)
2018-01-26 10:34:31 +01:00
Bo Maryniuk
ff89cd8527
Remove unused ImportError variable
2018-01-26 10:34:31 +01:00
Bo Maryniuk
f1b55e2ad0
Remove unused import
2018-01-26 10:34:31 +01:00
Bo Maryniuk
6ad6d11d97
Add unit test for timestamp error
2018-01-26 10:34:31 +01:00
Bo Maryniuk
50d3ce711e
Add restriction check of log call when only general error happens
2018-01-26 10:34:31 +01:00
Bo Maryniuk
9a187bfb3a
Add unit test for discovery general error handling
2018-01-26 10:34:31 +01:00
Bo Maryniuk
f700c3a870
Move helper class out of the test scope
2018-01-26 10:34:31 +01:00
Bo Maryniuk
89735d8599
Add unot test on no masters has been discovered
2018-01-26 10:34:31 +01:00
Bo Maryniuk
b4cc92e5af
Rename unit test
2018-01-26 10:34:31 +01:00
Bo Maryniuk
11c8afb1f4
Update unit test for error handling
2018-01-26 10:34:31 +01:00
Bo Maryniuk
d99dc2d64e
Add unit test for handling socket timeout
2018-01-26 10:34:31 +01:00
Bo Maryniuk
29bf60fca8
Add unit test for master map construction
2018-01-26 10:34:31 +01:00
Bo Maryniuk
acb4f27ac0
Lintfix: PEP8 missing whitespace
2018-01-26 10:34:31 +01:00
Bo Maryniuk
d328f7d350
Remove unused imports
2018-01-26 10:34:31 +01:00
Bo Maryniuk
7d305bb0b3
Add unit test for network query
2018-01-26 10:34:31 +01:00
Bo Maryniuk
c26e33671a
Add unit test for config is detached from the passed
2018-01-26 10:34:31 +01:00
Bo Maryniuk
61aaf4008c
Add unit test for the Client, config is passed
2018-01-26 10:34:31 +01:00
Bo Maryniuk
11e02bc7be
Add logging assertions and refactor the order of the calls
2018-01-26 10:34:31 +01:00
Bo Maryniuk
dc7746f579
Add unit test for the server runner
2018-01-26 10:34:31 +01:00
Bo Maryniuk
8d9bea0564
Add unit test for configuration of the server starter class
2018-01-26 10:34:31 +01:00
Bo Maryniuk
a0a574e13e
Add log.debug assertion check
2018-01-26 10:34:31 +01:00
Bo Maryniuk
a5f186f021
Add unit test for correct timestamp reply
2018-01-26 10:34:31 +01:00
Bo Maryniuk
dd73783f71
Remove Yoda-expression
2018-01-26 10:34:31 +01:00
Bo Maryniuk
e0ee188a19
Lintfix: too much empty lines
2018-01-26 10:34:31 +01:00
Bo Maryniuk
7e8a01e071
Add unit test for outdated timestamp with reply
2018-01-26 10:34:31 +01:00
Bo Maryniuk
6565c16be4
Add unit test for outdated timestamp at no reply
2018-01-26 10:34:31 +01:00
Bo Maryniuk
24ded041af
Add unit test datagram receives wrong timestamp, replies the reason
2018-01-26 10:34:31 +01:00
Bo Maryniuk
a7700e4a06
Fix unit test doc
2018-01-26 10:34:31 +01:00
Bo Maryniuk
671ed994b1
Add unit test for wrong timestamp with no reply (quiet)
2018-01-26 10:34:31 +01:00
Bo Maryniuk
0bcf66418d
Rename test to the more meaningful name
2018-01-26 10:34:31 +01:00
Bo Maryniuk
84fc332817
Add unit test on datagram_received when bad signature is happening
2018-01-26 10:34:31 +01:00
Bo Maryniuk
fe26b59308
Add transport factory unit test for send_to retry/failure
2018-01-26 10:34:31 +01:00
Bo Maryniuk
05a663a4c6
Refactor exception side effects
2018-01-26 10:34:31 +01:00
Bo Maryniuk
cef644c71e
Add unit test for factory transport on sending success
2018-01-26 10:34:31 +01:00
Bo Maryniuk
405253f9a1
Add factory unit test protocol attribute check
2018-01-26 10:34:31 +01:00
Bo Maryniuk
02c1a4833d
Move sock mock away to the utils mixin
2018-01-26 10:34:31 +01:00
Bo Maryniuk
76cb070c44
Add self ip detection unit test
2018-01-26 10:34:31 +01:00
Bo Maryniuk
4585b37b4e
Add protocol settings unittest
2018-01-26 10:34:31 +01:00
Bo Maryniuk
a39462ecee
Add availability method test
2018-01-26 10:34:31 +01:00
Bo Maryniuk
5771eedd3e
Move test case to the unit tests
2018-01-26 10:34:31 +01:00
Bo Maryniuk
6090dc1539
Add SSDP unit test case (init)
2018-01-26 10:34:31 +01:00
twangboy
484f7025d4
Endode results to utf-8
2018-01-25 16:29:42 -07:00
Gareth J. Greenaway
6639eec2a7
Fixing test failing in test_libcloud_loadbalancer.py
2018-01-25 14:43:36 -08:00
Gareth J. Greenaway
b3c1be27fb
Tier two unicode updates for modules, states and related tests.
2018-01-25 11:59:25 -08:00
twangboy
cf1007bfc8
Fix stacktrace at the end of a test
2018-01-25 18:45:43 +00:00
Dmitry Kuzmenko
aac6ad4ca3
Use binary data for clear token.
2018-01-25 20:32:00 +03:00
Dmitry Kuzmenko
91d5f8eb3a
Py3 crypt test fix
2018-01-25 20:31:59 +03:00
Dmitry Kuzmenko
a67fe51a5c
Fixed some tests, updated a doc.
2018-01-25 20:31:59 +03:00
Bo Maryniuk
0e3fc11ec4
Fix imports
2018-01-25 17:25:49 +01:00
Nicole Thomas
1c079f7c4c
Merge pull request #45677 from twangboy/win_fix_test_saltclass
...
Fix `unit.pillar.test_saltclass` for Windows
2018-01-25 10:08:08 -05:00
Nicole Thomas
16e4b5b57d
Merge pull request #45676 from terminalmage/ubuntu14-test-fixes
...
Ubuntu 14 test fixes
2018-01-25 09:57:50 -05:00
twangboy
317146537c
Fix paths
2018-01-25 00:43:43 +00:00
Nicole Thomas
10ce809123
Merge pull request #44903 from rallytime/raising-auth-errors
...
Distinguish between Authorization and Authentication errors
2018-01-24 17:12:38 -05:00
Nicole Thomas
2a562243b6
Merge pull request #45541 from terminalmage/py3-tier1
...
[PY3] Add unicode_literals to high-priority modules/states
2018-01-24 16:54:24 -05:00
Erik Johnson
fc92a30f7b
Ubuntu 14 test fixes
...
This fixes failures which were identified in Ubuntu 14 Jenkins PR builds
2018-01-24 15:39:08 -06:00
Nicole Thomas
36c4db07e0
Merge pull request #45578 from rallytime/unicode-changes-3
...
Add unicode_literals to even more modules and states
2018-01-24 16:33:33 -05:00
Nicole Thomas
66a38a1c61
Merge pull request #45601 from DSRCorporation/bugs/unicode_3
...
Salt Unicode Update 3rd tier 3rd bunch from DK
2018-01-24 16:32:29 -05:00
rallytime
9f78e53d4b
Merge branch '2017.7.3' into '2017.7'
...
No conflicts.
2018-01-24 16:09:17 -05:00
Nicole Thomas
b9b3e2e37e
Merge pull request #45610 from terminalmage/kill-six.b-with-fire
...
Replace all usage of six.b
2018-01-24 14:22:06 -05:00
rallytime
15043fd2e3
Fixup remaining test failures
2018-01-24 14:18:02 -05:00
rallytime
a7460cebc6
Lint fixes
2018-01-24 14:07:46 -05:00
Dmitry Kuzmenko
8916b91aa8
Fixed unit tests.
2018-01-24 20:37:11 +03:00
Nicole Thomas
012935892b
Merge pull request #45658 from terminalmage/tests
...
Several oxygen test fixes
2018-01-24 12:13:44 -05:00
Erik Johnson
9c86cd627a
[PY3] Add unicode_literals to high-priority modules/states
2018-01-24 10:33:58 -06:00
Nicole Thomas
5a5e780b72
Merge pull request #45566 from twangboy/win_fix_test_docker
...
Fix `unit.utils.test_docker` for Windows
2018-01-24 11:31:18 -05:00
Erik Johnson
4a6ab729dd
Fix failing pkg integration tests for releases with no '.'
...
Fedora releases are integers, and Arch's osrelease is simply `rolling`,
so https://github.com/saltstack/salt/pull/45636 caused these tests to
regress. This fixes them by moving the osrelease check until after the
MacOS check.
It also fixes the windows check, which would _always_ evaluate to `True`
since it was not calling the function. Therefore, the `if` would just be
a simple boolean which would resolve to `True` since it was just checking
a function reference.
2018-01-24 10:13:22 -06:00
Daniel Wallace
e827947878
Merge pull request #45618 from terminalmage/os.walk
...
Fix salt.utils.path.os_walk for certain Python 2 versions
2018-01-24 08:54:32 -07:00
Erik Johnson
d6d7da5c90
Replace all usage of six.b
...
It can't be trusted to produce bytes, it returns unicode when a unicode
string is passed.
2018-01-24 09:17:28 -06:00
Nicole Thomas
7934372b7b
Merge pull request #45649 from rallytime/bp-45634
...
Back-port #45634 to 2017.7.3
2018-01-24 09:59:42 -05:00
Nicole Thomas
fa373e658e
Merge pull request #45476 from rallytime/unicode-h
...
Add unicode_literals to modules, states, tests (H)
2018-01-24 09:15:40 -05:00
Nicole Thomas
d5cedf6d81
Merge pull request #45560 from rallytime/unicode-changes-1
...
Add unicode_literals to modules, states, and related tests
2018-01-24 09:13:58 -05:00
Nicole Thomas
e6e977c6a0
Merge branch 'oxygen' into win_fix_test_docker
2018-01-24 09:13:28 -05:00
Nicole Thomas
a5abe5be68
Merge pull request #45594 from garethgreenaway/tier_three_unicode_modules_state_updates
...
[oxygen] Tier three Unicode modules state updates
2018-01-24 09:12:01 -05:00
Nicole Thomas
189c133ebc
Merge branch 'oxygen' into bugs/unicode_3
2018-01-24 09:11:23 -05:00
Erik Johnson
b5ef58c2aa
Fix salt.utils.path.os_walk for certain Python 2 versions
...
This helper was designed to ensure that the paths returned were all
unicode types, but on a couple platforms having the path be a unicode
type causes a traceback deep in the stdlib within posixpath.
To work around this, this commit makes the helper a generator that
simply decodes each tuple returned from os.walk as we iterate.
2018-01-23 23:03:17 -06:00
Erik Johnson
21918efb5e
Update test to reflect unicode_literals
2018-01-23 19:34:25 -06:00
Erik Johnson
469d8e6e52
Fix difference between CSafeDumper and Dumper in yaml serializer test
2018-01-23 19:34:25 -06:00
Erik Johnson
458fdc326c
Increase timeout for orchestration test
...
This orch test takes longer on some test VM images than others.
2018-01-23 19:34:23 -06:00
Erik Johnson
0a6b06d8ea
Fix unnecessary/incorrect usage of six.binary_type
2018-01-23 17:54:27 -05:00
Nicole Thomas
79ee24c0c7
Merge pull request #45611 from terminalmage/tests-log-level
...
Fix unnecessary/incorrect usage of six.binary_type
2018-01-23 17:53:19 -05:00
Nicole Thomas
fc18995873
Merge pull request #45438 from terminalmage/py3-salt.utils-t-v
...
[PY3] Add unicode_literals to salt.utils modules (T-V)
2018-01-23 17:14:16 -05:00
Nicole Thomas
4423989ac8
Merge pull request #45587 from DSRCorporation/bugs/unicode_2
...
Salt Unicode Update 3rd tier 2nd bunch from DK
2018-01-23 17:08:59 -05:00
rallytime
fb4f2dd0fa
Distinguish between Authorization and Authentication errors
...
And handle the error distiction being returned from the publish function
instead of sending empty strings.
2018-01-23 17:05:22 -05:00
Nicole Thomas
4a116beba6
Merge pull request #45639 from rallytime/merge-oxygen
...
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-23 17:03:26 -05:00
Nicole Thomas
0a07e0d259
Merge pull request #45642 from rallytime/bp-45636
...
Back-port #45636 to 2017.7.3
2018-01-23 17:00:29 -05:00
Nicole Thomas
dbdef8230e
Merge pull request #45630 from bdrung/2017.7
...
Fix tests
2018-01-23 16:56:46 -05:00
Nicole Thomas
e5c9cd91e8
Merge pull request #45619 from garethgreenaway/2017_7_test_mac_user_enable_auto_login
...
[2017.7] Fixing test_mac_user_enable_auto_login
2018-01-23 16:56:03 -05:00
Ch3LL
1c78fc23ea
Add different service name for Mac 10.13 test
2018-01-23 16:53:06 -05:00
Nicole Thomas
c290b6320b
Merge pull request #45634 from Ch3LL/mac-service
...
Add different service name for Mac 10.13 test
2018-01-23 16:51:56 -05:00
rallytime
54e154b62f
Fix test errors created with unicode changes
...
- jboss_cli test: reduce test complication by not mixing raw and \u
- remove one test from test_junos: it's not really testing anything since it's heavily mocked
2018-01-23 15:48:42 -05:00
rallytime
637ec36739
Fix state unit tests for kernelpkg
2018-01-23 15:26:26 -05:00
rallytime
ca946886f0
Lint fix
2018-01-23 15:26:26 -05:00
rallytime
c08c67f3d4
Add unicode_literals to modules, states, and related tests
2018-01-23 15:26:25 -05:00
Gareth J. Greenaway
49d0d1f1a5
Updating various modules, states and related tests for Unicode fun & profit part one.
2018-01-23 11:53:16 -08:00
Frode Gundersen
e6917a291e
fix test_archive test for mac on 2017.7 branch
2018-01-23 14:35:32 -05:00
Nicole Thomas
0931b6417d
Merge pull request #45636 from Ch3LL/mac-tests
...
Fix mac service and pkg tests for 10.13
2018-01-23 13:44:55 -05:00
rallytime
583a89ca6f
Update old utils paths to new paths
2018-01-23 13:34:24 -05:00
rallytime
3c298afa72
Merge branch '2017.7' into 'oxygen'
...
Conflicts:
- salt/modules/pip.py
- salt/modules/reg.py
- salt/modules/win_pkg.py
- salt/runners/manage.py
- salt/states/pkg.py
- salt/transport/zeromq.py
- salt/utils/event.py
- tests/integration/modules/test_pip.py
- tests/integration/states/test_user.py
- tests/unit/grains/test_core.py
- tests/unit/states/test_archive.py
- tests/unit/utils/test_boto.py
2018-01-23 13:26:43 -05:00
Ch3LL
df0ad54c9a
remove unnecessary variable for test
2018-01-23 11:47:32 -05:00