Commit Graph

12299 Commits

Author SHA1 Message Date
Bo Maryniuk
ea0b2e171f Lintfix: E8302, PEP8 expected two blank lines 2018-01-31 10:17:04 +01:00
Gareth J. Greenaway
59fc7fcb34
Bumping up the timeout for integration.cloud.providers.test_ec2 tests. 2018-01-30 15:01:36 -08:00
Bo Maryniuk
13087b2062 Fix unit test: capture log message and redirect it to the test assertion 2018-01-30 21:14:04 +01:00
Bo Maryniuk
8a9dacc30b Fix unit tests for HAS_DBUS removal 2018-01-30 21:05:00 +01:00
Bo Maryniuk
56f5645a09 Add unit test for localectl on arbitrary structure parser 2018-01-30 20:59:23 +01:00
Bo Maryniuk
5af33fbb0d Add unit test for localectl output parse on broken content 2018-01-30 20:51:23 +01:00
Bo Maryniuk
bcd04fa0ab Add log call verification 2018-01-30 20:47:26 +01:00
Bo Maryniuk
4f39075883 Add unit test for calling localectl parser on an empty output 2018-01-30 20:47:04 +01:00
Bo Maryniuk
a5d3098e9e Add unit test for localectl output status parser when no systemd installed 2018-01-30 20:38:33 +01:00
Bo Maryniuk
b4b0ea7d58 Add unit test for localectl output status parser 2018-01-30 20:36:17 +01:00
Bo Maryniuk
ec4ef24cd3 Add unit test for set_locale on unknown system 2018-01-30 19:16:15 +01:00
Bo Maryniuk
98c5ed8ef6 Remove an old unit test for set_locale 2018-01-30 19:15:54 +01:00
Bo Maryniuk
bdff4dc74c Fix system tuning conditions 2018-01-30 19:15:26 +01:00
Bo Maryniuk
e78dd78247 Add unit test for solaris when list_avail does not return proper locale 2018-01-30 19:07:40 +01:00
Bo Maryniuk
67d287316c Add unit test on solaris with list_avail returning proper locale 2018-01-30 18:58:44 +01:00
Bo Maryniuk
2e07701a0a Add unit test for set_locale on Gentoo system without systemd 2018-01-30 18:52:37 +01:00
Bo Maryniuk
a5acac5fc7 Add unit test for set_locale on Debian without systemd 2018-01-30 18:48:14 +01:00
Bo Maryniuk
cfb25f0e90 Add unit test for set_locale on RedHat systems without systemd 2018-01-30 18:45:55 +01:00
Bo Maryniuk
b1e8606d02 Add unit test with systemd and dbus enabled on SLE12 2018-01-30 18:43:01 +01:00
Bo Maryniuk
ceda257846 Add unit test for set_locale with dbus and systemd on any platform 2018-01-30 18:34:06 +01:00
Bo Maryniuk
b91ee79ef6 Add unit test for set_locale on any system with systemd and no dbus available 2018-01-30 18:32:34 +01:00
Bo Maryniuk
5bb80575d1 Fix unit test for calling a proper function while parsing localectl 2018-01-30 17:32:37 +01:00
Bo Maryniuk
b73c1d7308 Add unit test for calling unknown platform 2018-01-30 17:32:14 +01:00
Bo Maryniuk
d82b60a807 Add unit test for get_locale on Solaris 2018-01-30 17:28:28 +01:00
Bo Maryniuk
11805e47af Add unit test for get_locale on gentoo 2018-01-30 17:27:26 +01:00
Bo Maryniuk
933b365010 Add unit test for get_locale on Debian without systemd/dbus 2018-01-30 17:26:26 +01:00
Bo Maryniuk
409de1e5f6 Fix docstring on RedHat unit test for get_locale 2018-01-30 17:26:05 +01:00
Bo Maryniuk
7c19e235b1 Add unit test for get_locale on redhat systems with no systemd 2018-01-30 17:24:04 +01:00
Bo Maryniuk
df16df3abf Disable salt.utils.systemd.booted to be actually called 2018-01-30 17:23:40 +01:00
Bo Maryniuk
b3fff6744c Add unit test for getting locale on SLE12 with systemd and dbus available 2018-01-30 17:18:13 +01:00
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
Erik Johnson
0d92e0a868
Add a test for issue 40578 2018-01-30 09:51:51 -06:00
Nicole Thomas
3221d734d4
Merge pull request #45768 from garethgreenaway/724_py2_pkg_tests_failing
[oxygen] fixes to integration.modules.test_pkg.PkgModuleTest.test_pkg_upgrade_has_pending_upgrades
2018-01-30 09:30:26 -05:00
Nicole Thomas
6cb92a4b89
Merge pull request #45770 from gtmanfred/oxygen
fix modjk test
2018-01-30 08:26:07 -05:00
Erik Johnson
f95139cae3
Add an option to silently keep data that fails to decode 2018-01-29 17:22:54 -06:00
Daniel Wallace
c0e72ffd73
fix modjk test 2018-01-29 15:08:00 -07: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
Gareth J. Greenaway
a4bb5be02f
pkg.upgrade does not return errors when something when wrong but raises an exception, so this code is no longer relevant. 2018-01-29 13:27:30 -08: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
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
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
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
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