Commit Graph

90118 Commits

Author SHA1 Message Date
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
Nicole Thomas
c3b459cb0c
Merge pull request #45732 from terminalmage/struct-py2
Use bytestrings for struct.pack/unpack
2018-01-27 21:20:30 -05: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
730eabac29
PY3-compatibility fixes in TLS module
This fixes the following tests:

- unit.modules.test_tls.TLSAddTestCase.test_create_ca
- unit.modules.test_tls.TLSAddTestCase.test_create_ca_signed_cert
- unit.modules.test_tls.TLSAddTestCase.test_create_csr
- unit.modules.test_tls.TLSAddTestCase.test_create_pkcs12
- unit.modules.test_tls.TLSAddTestCase.test_create_self_signed_cert
- unit.modules.test_tls.TLSAddTestCase.test_pyOpenSSL_version_destructive
- unit.modules.test_tls.TLSAddTestCase.test_recreate_ca
- unit.modules.test_tls.TLSAddTestCase.test_recreate_ca_signed_cert
- unit.modules.test_tls.TLSAddTestCase.test_recreate_csr
- unit.modules.test_tls.TLSAddTestCase.test_recreate_pkcs12
- unit.modules.test_tls.TLSAddTestCase.test_recreate_self_signed_cert
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
a1bfab5289
Merge branch 'isbm-isbm-3136-unittests-to-discovery' into oxygen 2018-01-27 14:49:10 -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
Nicole Thomas
f7949a5b23
Merge pull request #45704 from terminalmage/tests
Fix 9 tests on Python 3
2018-01-26 15:40:41 -05:00
Nicole Thomas
99e6043166
Merge pull request #45698 from terminalmage/salt.exceptions-traceback
Fix traceback when exception instances are passed to our custom exceptions
2018-01-26 15:04:56 -05:00
Erik Johnson
110a5eefde
Fix traceback when exception instances are passed to our custom exceptions 2018-01-26 11:23:11 -06: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
79aa909d7a
Docstring tweak 2018-01-26 09:57:06 -06:00
Erik Johnson
8e3220f43a
Fix unit.templates.test_jinja.TestCustomExtensions.test_uuid for PY3 2018-01-26 09:57:06 -06:00
Erik Johnson
78a7d654fa
Fix unit.modules.test_tls.TLSAddTestCase.test_pyOpenSSL_version_destructive for PY3
Also fix some deprecation warnings from pyopenssl
2018-01-26 09:56:42 -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
Nicole Thomas
4697769d0b
Merge pull request #44962 from DSRCorporation/m2crypto
Migrate to M2crypto
2018-01-26 08:54:04 -05:00
Nicole Thomas
73d0a10a65
Merge pull request #45581 from garethgreenaway/tier_two_unicode_modules_state_palooza
[oxygen] Updating Tier 2 modules, states and related tests for Unicode
2018-01-26 08:50:05 -05: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
30e8a3b810 Refactor to bailout in case no masters found 2018-01-26 10:34:31 +01:00
Bo Maryniuk
d17c9e8b0a Bugfix for refactoring: the exception was never raised anyway 2018-01-26 10:34:31 +01:00
Bo Maryniuk
b4cc92e5af Rename unit test 2018-01-26 10:34:31 +01:00