Commit Graph

90277 Commits

Author SHA1 Message Date
Bo Maryniuk
22630b7a32 Fix doc for unit test 2018-01-30 17:17:46 +01:00
Bo Maryniuk
0ef739b8a7 Add unit test calling get_locale with systemd and dbus available 2018-01-30 17:06:10 +01:00
Bo Maryniuk
3c37cfd76a Add unit test calling get_locale with systemd but no dbus available 2018-01-30 17:04:37 +01:00
Bo Maryniuk
197586230a Skip tests if there is no pytest installed 2018-01-30 17:03:58 +01:00
Bo Maryniuk
e183eb2c5a Fix set_locale logic for localectl favour 2018-01-30 17:03:44 +01:00
Bo Maryniuk
8d99ae767e Remove outdated comment 2018-01-30 16:59:55 +01:00
Bo Maryniuk
1ee911e84d Flatten the code 2018-01-30 16:59:30 +01:00
Bo Maryniuk
2c1de6903e Update the comment 2018-01-30 16:59:13 +01:00
Bo Maryniuk
5e0e999428 Bugfix: use localectl whenever possible (except SLE12) 2018-01-30 16:01:27 +01:00
Bo Maryniuk
1ebf197135 Use new localectl parser while setting the locale 2018-01-30 16:00:46 +01:00
Bo Maryniuk
06ebc7bea6 Flatten the code 2018-01-30 16:00:19 +01:00
Bo Maryniuk
29ddb741f7 Rewrite localectl status parsing, including taking all the data into a dict 2018-01-30 15:08:02 +01:00
Nicole Thomas
7c5fef13a9
Merge pull request #45702 from twangboy/win_fix_test_data
Endode results to utf-8
2018-01-29 17:04:46 -05:00
Nicole Thomas
5fe8d646de
Merge pull request #45757 from rallytime/bp-45746
Back-port #45746 to oxygen
2018-01-29 16:13:42 -05:00
Nicole Thomas
639215eb2e
Merge pull request #45754 from terminalmage/runtests
runtests.py: allow user to set optparse options in REPL
2018-01-29 13:29:25 -05:00
Nicole Thomas
0fc2309cda
Merge branch 'oxygen' into win_fix_test_data 2018-01-29 13:24:03 -05:00
Nicole Thomas
0011f2a130
Merge pull request #45750 from rallytime/bp-45697
Back-port #45697 to oxygen
2018-01-29 12:06:53 -05:00
Solaris
1ba46ce456
Update json.py
Hi, i'm reading the salt code,and i find a little bug here,is it?
2018-01-29 11:59:54 -05:00
Nicole Thomas
c54a07d3e5
Merge pull request #45715 from isbm/isbm-oxygen-unicode-S3172
Move to Unicode (3rd tier, tests)
2018-01-29 11:19:36 -05:00
Nicole Thomas
50af1d0641
Merge pull request #45714 from isbm/isbm-oxygen-unicode-S3170
Move to Unicode (3rd tier, tests)
2018-01-29 11:17:16 -05:00
Erik Johnson
a04087b2e2
runtests.py: allow user to set optparse options in REPL
This allows for the options set by optparse to be passed to main() as
kwargs, so that the test suite can be run from within a REPL.

>>> import runtests
>>> try:
...     runtests.main(ssh=True, verbosity=2, coverage_xml='/tmp/coverage.xml', xml='/tmp/xml-unittests-output', run_destructive=True, output_columns=80, sysinfo=True)
... except SystemExit:
...     pass
...
>>>
2018-01-29 08:53:40 -06:00
Nicole Thomas
d6322d2e00
Merge pull request #45741 from terminalmage/squelch-error
Squelch pyVmomi error in __virtual__ functions
2018-01-29 09:03:40 -05:00
Jasper Lievisse Adriaanse
92d2c1a708
philips_hue: extend docs and fix status with id 2018-01-29 09:01:33 -05:00
Nicole Thomas
35fbbb6857
Merge pull request #45737 from terminalmage/ssdp-unit-tests
SSDP PY3 compatibility fixes
2018-01-29 08:50:11 -05:00
Bo Maryniuk
5da83c6265 Lintfix: E9402 (use of black-listed module) 2018-01-29 14:13:45 +01:00
Bo Maryniuk
634695fb11 Lintfix: E9402 (blacklisted module usage) 2018-01-29 14:09:59 +01:00
Erik Johnson
991a91fe92
Squelch pyVmomi error in __virtual__ functions
Logging an error in the __virtual__ causes an error to be logged EVERY
TIME it is executed, which results in a lot of unnecessary logging.

This reduces the log level to debug for these messages.
2018-01-28 17:20:22 -06:00
Erik Johnson
293bdf2517
Merge pull request #45726 from rallytime/merge-oxygen
[oxygen] Merge forward from 2017.7 to oxygen
2018-01-28 13:05:00 -06:00
Erik Johnson
c34a6f72cd
SSDP PY3 compatibility fixes 2018-01-28 11:09:20 -06:00
rallytime
ce3902b158
Merge branch '2017.7' into merge-oxygen 2018-01-28 08:51:03 -05:00
Nicole Thomas
eb91ae8b6e
Merge pull request #45734 from terminalmage/fix-trimmed-output
Fix traceback in CLI output when value is trimmed
2018-01-28 08:35:56 -05:00
Nicole Thomas
d50140e0f2
Merge pull request #45725 from garethgreenaway/806_CentOS_7_Failing_CMDMOD_test
[oxygen] Argument to struct.pack must be a bytescode not unicode with Python 2.7.5
2018-01-28 08:29:45 -05: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
863e105866
Merge pull request #45733 from terminalmage/rh-network-tests
PY3-compatibility fix for RH networking module
2018-01-28 08:25:50 -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
966ad07452
Fix traceback in CLI output when value is trimmed
The comparison here was looking for the wrong string, causing the
trimmed value not to be detected and leading to a traceback several
lines later.
2018-01-27 20:48:41 -06: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
Nicole Thomas
7516bfbffe
Merge pull request #45712 from bdrung/fix-version-decode
Decode git call output in Python 3
2018-01-27 21:03:20 -05:00
Erik Johnson
e0c7fef313
PY3-compatibility fix for RH networking module
Encoding on Python 3 produces a bytestring, when what we need is
a unicode string.
2018-01-27 19:39:27 -06:00
Gareth J. Greenaway
bdb01fabc9
Adding b'' to the struct.unpack calls. 2018-01-27 15:41:17 -08:00
Gareth J. Greenaway
9bbe60832b
Swapping out str() for b'' instead. 2018-01-27 15:35:21 -08:00
Gareth J. Greenaway
ec86cfde0e
Argument to struct.pack must be a string not unicode. 2018-01-27 15:35:21 -08: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