Nicole Thomas
543ef6d8a4
Merge pull request #45703 from terminalmage/path
...
Improve/remove PATH environment modifications
2018-02-01 16:07:16 -05:00
Nicole Thomas
7d5cf806f9
Merge pull request #45772 from terminalmage/decode-all-the-things
...
Decode payloads on Python 2 to preserve unicode in jobs and fileclient reqs
2018-02-01 16:06:50 -05:00
Benjamin Drung
b6181b5ed6
Fix Unicode tests when run with LC_ALL=POSIX
...
When running the unit tests with the locale set to POSIX, some Unicode
tests fail:
$ LC_ALL=POSIX python3 ./tests/runtests.py --unit
[...]
======================================================================
ERROR: test_list_products (unit.modules.test_zypper.ZypperTestCase)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/unit/modules/test_zypper.py", line 236, in
test_list_products
'stdout': get_test_data(filename)
File "tests/unit/modules/test_zypper.py", line 53, in get_test_data
return rfh.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
828: ordinal not in range(128)
======================================================================
ERROR: test_non_ascii (unit.templates.test_jinja.TestGetTemplate)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/unit/templates/test_jinja.py", line 341, in test_non_ascii
result = fp.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5:
ordinal not in range(128)
======================================================================
ERROR: test_non_ascii_encoding
(unit.templates.test_jinja.TestGetTemplate)
[CPU:0.0%|MEM:73.2%]
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/unit/templates/test_jinja.py", line 303, in
test_non_ascii_encoding
fp_.read(),
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5:
ordinal not in range(128)
----------------------------------------------------------------------
Therefore open files in binary mode and explicitly decode them with
utf-8 instead of their default locale.
2018-02-01 19:24:23 +01:00
Erik Johnson
01194d6cdd
Update syslog_ng tests to reflect change in PATH behavior
2018-02-01 10:54:09 -06:00
Erik Johnson
1b78e49e1c
win_path: Do not normalize path to lowercase
...
This removes the lowercase normalization and handles case-insensitive
path matches. It also combines local path and system path inspection
into a single helper function in both add() and remove(), for simplicity.
Additionally, the add/remove unit tests have been rewritten to test
a wider array of use cases.
2018-02-01 10:54:09 -06:00
Erik Johnson
1b5c45a1fd
Add support for negative indexes
2018-02-01 10:54:09 -06:00
Erik Johnson
52ebc31f3d
Add comment regarding PATH handling
2018-02-01 10:54:09 -06:00
Erik Johnson
19d75b8eb9
Improve/remove PATH environment modifications
...
- `salt/modules/rbenv.py`: Forces use of str types in the custom env dict
passed to `cmd.run_all`.
- `salt/modules/syslog_ng.py`: Ditches janky PATH munging in favor of
the stable and long-existing support built into cmdmod.py
- `salt/modules/win_path.py`: Forces use of str types in path
modification functions.
- `salt/states/win_path.py`: Completely rewritten. Duplicated code from
the execution module removed in favor of calls to the execution
module. Tests junked and 14 new tests written.
- `salt/utils/path.py`: The `which()` function was mistakenly modified
in 20033ee
to inject the directories in the POSIX default path into
the PATH environment variable (even for Windows!). We never used the
PATH to find the executables, we simply cycled through the dirs one by
one and looked for an executable file matching the named path. The
code that modifies the path is now removed. In addition, `which()` now
uses `salt.utils.path.join()`, which gracefully handles mismatched
str and unicode directory components to prevent decode errors.
`join()` has also been simplified to use `salt.utils.data.decode()` to
normalize directory components to unicode.
2018-02-01 10:54:09 -06:00
Erik Johnson
99de368afa
PY2: Fix system.set_computer_desc and set_computer_desc when desc is unicode
...
Both string_escape and unicode_escape don't like unicode content. This
scraps the escape encoding and simply does a series of string
replacements to disabmibguate quotes, newlines, and tab characters.
2018-02-01 10:30:12 -06:00
Erik Johnson
e0f4f70569
Update test to reflect type change due to unicode_literals
2018-02-01 10:30:12 -06:00
Bo Maryniuk
9e86a7d5f6
Lintfix: E8303 -- too many empty lines
2018-02-01 12:58:15 +01:00
Bo Maryniuk
5af6f147e6
Add unit test on set_locale for error handling when update-locale is not installed
2018-01-31 15:55:34 +01:00
Bo Maryniuk
4131f2e964
Fix unit test (mock everything!)
2018-01-31 15:52:36 +01:00
Bo Maryniuk
222b929d92
Add unit test for dbus locale parser which does not matching the results.
2018-01-31 15:42:32 +01:00
Bo Maryniuk
d2dcf9986e
Add unit test for dbus locale parser matching the results.
2018-01-31 15:36:51 +01:00
Nicole Thomas
3cad6affbb
Lint: Add extra blank line
2018-01-31 09:29:33 -05:00
Bo Maryniuk
9468f7d91e
Flatten the code
2018-01-31 13:28:07 +01:00
Bo Maryniuk
eeb08405f4
Remove old-style camel assertion in favour of PyTest built-in assertions
2018-01-31 13:24:47 +01:00
Bo Maryniuk
ec77e92dcf
Move unit test test_avail to py.test
2018-01-31 13:20:46 +01:00
Bo Maryniuk
a4e44c40f9
Add unit test for gen_locale is handling error while calling not installed localedef on Suse os-family.
2018-01-31 13:17:53 +01:00
Bo Maryniuk
3d4e44e18c
Add unit test gen_locale is calling localedef on Suse os-family.
2018-01-31 13:14:35 +01:00
Bo Maryniuk
16419ec6d3
Add check on gen_locale for Suse-specific path
2018-01-31 13:00:12 +01:00
Bo Maryniuk
58dde2ccbc
Add unit test for gen_locale on Suse os_family with invalid locale
2018-01-31 12:54:42 +01:00
Bo Maryniuk
00f2695c79
Lintfix W1699: Python3 incompat
2018-01-31 10:19:04 +01:00
Bo Maryniuk
d423df4ded
Lintfix E8301: expected 1 blank line
2018-01-31 10:17:44 +01:00
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
William Villeneuve
217791079b
some code cleanup (lint errors and escape_argument as _cmd_quote)
2018-01-28 12:42:33 -05: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
Gareth J. Greenaway
359265869f
Adding a couple tests to ensure that duration is included in state run results even when states do not run.
2018-01-26 12:06:29 -08: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
William Villeneuve
1c29bc5a3d
fixed quoting of script path in cmd.script
2018-01-26 09:05:18 -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
Ch3LL
acb14fd43d
fix pylint
2018-01-23 11:42:49 -05:00
Ch3LL
a9b12cd1ea
Fix mac service and pkg tests for 10.13
2018-01-23 11:39:06 -05:00
rallytime
10b7b0601d
Add unicode_literals to more modules, states, and tests
2018-01-23 10:08:59 -05:00
Ch3LL
31b712e27d
Add different service name for Mac 10.13 test
2018-01-23 10:07:10 -05:00
rallytime
a35cf9ca1e
Add unicode_literals to modules, states, tests (H)
2018-01-23 09:55:46 -05:00
Nicole Thomas
9facc5ede5
Merge pull request #45543 from terminalmage/py3-tier1-2
...
[PY3] Add unicode_literals to more high-priority states/modules
2018-01-23 09:38:21 -05:00
Nicole Thomas
a8dabbc150
Merge branch 'oxygen' into bugs/unicode_2
2018-01-23 07:56:21 -05:00
Nicole Thomas
0e50abd7f7
Merge pull request #45593 from rallytime/unicode-changes-6
...
Add unicode_literals to modules/states [z]
2018-01-23 07:52:03 -05:00
Nicole Thomas
ff997aa552
Merge pull request #45592 from rallytime/unicode-changes-5
...
Add unicode_literals to modules, states, and tests [n]
2018-01-23 07:50:46 -05:00
Nicole Thomas
5c907ebb15
Merge pull request #45586 from rallytime/unicode-changes-4
...
Add more unicode_literals to modules, states, and test files
2018-01-23 07:49:55 -05:00
Nicole Thomas
2cf7a806bc
Merge pull request #45557 from DSRCorporation/bugs/unicode_1
...
Salt Unicode Update 3rd tier 1st bunch from DK
2018-01-23 07:48:11 -05:00
Nicole Thomas
453401a9a0
Merge pull request #45621 from terminalmage/py3-fix-salt.utils.json
...
salt.utils.json: only encode data on PY2
2018-01-23 07:42:49 -05:00
Benjamin Drung
76d44e9490
Fix skipping test when boto is not installed
...
When boto and moto are not installed, the BotoVpcTestCaseBase() should
be skipped. _get_boto_version() and _get_moto_version() require that
boto and moto are installed, but are called anyway in the skipIf
condition.
2018-01-23 13:32:22 +01:00
Benjamin Drung
2b9b262357
Fix unit.modules.test_cmdmod.CMDMODTestCase.test_run
...
The test_run unit tests end result when a command is not found. When
_run() is called without setting cwd, it will use the home directory as
working directory. When the home directory does not exist, the unit test
will fail:
Traceback (most recent call last):
File "tests/unit/modules/test_cmdmod.py", line 231, in test_run
ret = cmdmod._run('foo', use_vt=True).get('stderr')
File "salt/modules/cmdmod.py", line 536, in _run
.format(cwd)
salt.exceptions.CommandExecutionError: Specified cwd
'/sbuild-nonexistent' either not absolute or does not exist
Therefore set cwd to the current directory since the working directory
is not used in this test case.
This fixes one failing test of #45627 .
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-01-23 13:18:18 +01:00
Erik Johnson
ba54ff44a6
add tests for json load/dump helpers
2018-01-22 20:16:59 -06:00
Gareth J. Greenaway
f5f03e1e6c
Fixing integration.modules.test_mac_user.MacUserModuleTest.test_mac_user_disable_auto_login
2018-01-22 14:10:23 -08:00
Nicole Thomas
98e2d66809
Merge pull request #45567 from twangboy/win_fix_test_process
...
Fix `unit.utils.test_process` on Windows
2018-01-22 14:50:05 -05:00
Nicole Thomas
d066e75473
Merge pull request #45568 from twangboy/win_fix_test_schema
...
Fix `unit.utils.test_schema` for Windows/Py2
2018-01-22 14:46:23 -05:00
Nicole Thomas
af033f1c93
Merge pull request #45549 from rallytime/unicode-i
...
Add unicode_literals to modules, states, tests (I)
2018-01-22 14:40:11 -05:00
Erik Johnson
6aa865cf54
Fix unnecessary/incorrect usage of six.binary_type
2018-01-22 11:17:06 -06:00
rallytime
a5fc3b3363
Merge branch '2017.7.3' into '2017.7'
...
No conflicts.
2018-01-22 11:55:54 -05:00
Dmitry Kuzmenko
e119b7c55a
Fixed lint failures
2018-01-22 17:59:17 +03:00