Commit Graph

8411 Commits

Author SHA1 Message Date
Daniel A. Wozniak
acc144d6a9
Fix directory unit test 2018-08-17 14:08:58 -07:00
Daniel A. Wozniak
913ea5ebde
Fix directory unit test 2018-08-17 14:07:19 -07:00
Daniel A. Wozniak
a7ee07ab81
Fix is_windows checks 2018-08-17 13:48:31 -07:00
Daniel A. Wozniak
74b197f643
Account for normalized dirs in unit tests 2018-08-17 13:36:41 -07:00
Daniel A. Wozniak
3363238ff6
Account for normalized dirs in unit tests 2018-08-17 13:17:08 -07:00
Erik Johnson
8bda1e5ae3
Merge pull request #49091 from terminalmage/rename-test-files
Rename/re-organize test files in 2018.3 branch
2018-08-17 07:26:43 -05:00
Wesley Whetstone
990fdb6a52
decorator link fix, updating context names, as well as updating macutils tests for latest changes 2018-08-15 11:43:20 -04:00
Mike Place
c8510a6b96
Merge pull request #49062 from weswhet/fix-mac-available-services
fix memoize on available macOS services
2018-08-15 17:34:24 +02:00
Wesley Whetstone
f1b40c4411
decorator link fix, updating context names, as well as updating macutils tests for latest changes 2018-08-14 14:24:33 -07:00
Erik Johnson
613f0611f8
Lint 2018-08-14 13:53:31 -05:00
Erik Johnson
81f272f91a
Rename outputter tests to match naming convention 2018-08-14 13:53:31 -05:00
Erik Johnson
1fccbf764a
Rename acl unit test module to confirm to naming convention 2018-08-14 13:53:30 -05:00
Erik Johnson
160223dc80
Consolidate/move fileclient/fileserver tests to conform to naming convention 2018-08-14 13:53:30 -05:00
Erik Johnson
1aacf77b3e
Rename/consolidate salt.utils unit tests to conform to naming convention 2018-08-14 13:53:30 -05:00
Erik Johnson
5a0990b087
Rename pillar unit test modules to reflect naming convention 2018-08-14 13:53:30 -05:00
Erik Johnson
516594b164
Consolidate netapi tests and move them to reflect naming convention 2018-08-14 13:53:30 -05:00
Erik Johnson
8f5fef55d4
Consolitdate and move salt-ssh unit tests to proper location 2018-08-14 13:53:30 -05:00
Erik Johnson
9801ce3271
Consolidate and move loader tests to test/unit/test_loader.py 2018-08-14 13:53:29 -05:00
Erik Johnson
f72bbc5036
Rename beacon unit test modules to conform with naming convention
Also consolidate pyroute2 network_settings tests into network_settings
beacon test module.
2018-08-14 13:53:29 -05:00
Erik Johnson
fa76cb6ada
Move inspectlib tests to conform with naming convention 2018-08-14 13:53:29 -05:00
Erik Johnson
81e38239fe
Move shared kernelpkg test cases to tests/support/ 2018-08-14 13:53:29 -05:00
Erik Johnson
e0d95b640f
Consolidate misplaced tests into tests/unit/test_config.py 2018-08-14 13:53:29 -05:00
Erik Johnson
3a1ec12613
Rename slack engine test file to respect naming convention 2018-08-14 13:53:29 -05:00
Erik Johnson
c9c9d20f19
Rename test_map_conf test file to respect naming convention 2018-08-14 13:53:29 -05:00
Erik Johnson
5c936c016d
Rename the aptpkg state module to respect naming convention 2018-08-14 13:53:29 -05:00
Erik Johnson
ac50eb84e1
Remove redundant "test" from filename 2018-08-14 13:53:29 -05:00
Erik Johnson
b03a56355b
Move jinja templating tests alongside salt/utils/jinja.py's tests 2018-08-14 13:53:29 -05:00
Erik Johnson
b49d8df210
Fix bad copypasta in docstring 2018-08-14 13:53:29 -05:00
Erik Johnson
069102b82d
Rename sentry returner test to match naming convention 2018-08-14 13:53:29 -05:00
Erik Johnson
23980830d1
Use tests.support.paths instead of deprecated integration module 2018-08-14 13:53:29 -05:00
Erik Johnson
ffb842d055
Move salt.utils.context tests to their proper location 2018-08-14 13:53:28 -05:00
Erik Johnson
d69069be13
Move context cache tests to their proper location 2018-08-14 13:53:28 -05:00
Nicole Thomas
0e1ed7b923
Merge pull request #49055 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-08-13 15:20:10 -04:00
rallytime
83a15cb623
Add optimization_order config to mocked opts 2018-08-13 12:06:48 -04:00
rallytime
ea6883ee55
Update old utils paths to new utils paths 2018-08-10 13:15:53 -04:00
rallytime
201031fa8a
Merge branch '2017.7' into '2018.3'
Conflicts:
  - 	doc/man/salt.7
  - 	doc/ref/configuration/minion.rst
  - 	salt/cloud/clouds/ec2.py
  - 	salt/returners/highstate_return.py
  - 	tests/support/gitfs.py
  - 	tests/unit/loader/test_loader.py
2018-08-10 13:12:14 -04:00
Bo Maryniuk
b7da571624 Fix imports 2018-08-10 15:52:01 +02:00
rallytime
ed6fb8b739
Merge branch '2017.7.8' into '2017.7'
No conflicts.
2018-08-10 09:08:47 -04:00
Nicole Thomas
4eeb75f028
Merge pull request #49033 from terminalmage/issue48996
Fix file.get_diff for remote files
2018-08-09 17:06:52 -04:00
Nicole Thomas
b24c96a292
Merge pull request #48926 from travispaul/fix-netbsd-8-new-ifconfig
Handle ifconfig output differently for NetBSD >= 8.0
2018-08-09 16:07:43 -04:00
rallytime
a43d9b4ba6
Mark a jinja template test as flaky
Fixes https://github.com/saltstack/salt-jenkins/issues/1059
2018-08-09 15:51:34 -04:00
Nicole Thomas
7d6b9ed0a5
Merge pull request #48803 from dmurphy18/aix_filesystems
Support for execution modules and states mount on AIX
2018-08-09 13:51:54 -04:00
Nicole Thomas
9b6a9ff4f1
Merge pull request #48932 from twangboy/fix_win_repo
Fix pkg.install when pkg already installed
2018-08-09 13:45:50 -04:00
Erik Johnson
d6e5038022
Fix file.get_diff for remote files
Once the files were cached, the function was still trying to open the
paths passed into it, not the cached paths. This fixes that and adds
additional unit tests.
2018-08-09 10:56:05 -05:00
Travis Paul
d59b6d8269
Add unit test for NetBSD 8 ifconfig changes
lint changes in salt/utils/network.py
2018-08-09 21:26:08 +08:00
David Murphy
92818f816b Fixes for testing 2018-08-08 12:15:59 -06:00
David Murphy
77dd7a1743 Adjust unit tests 2018-08-08 12:15:59 -06:00
David Murphy
9fb5641dc7 Mount unit tests for modules and states for AIX 2018-08-08 12:15:59 -06:00
David Murphy
b28f427432 Save off work after laptop issue 2018-08-08 12:15:59 -06:00
Erik Johnson
0441cd56ef
Add optimization_order to mocking 2018-08-08 11:22:52 -05:00
Erik Johnson
a78663a301
Lint 2018-08-08 11:22:52 -05:00
Erik Johnson
764969ce08
Add a test to confirm that .py files are still loaded correctly
Also, use USE_IMPORTLIB to gate testing on optimization_order, since
this only works with Python 3.5+.
2018-08-08 11:22:52 -05:00
Erik Johnson
e7c10196da
Quiet the byte compiling for PY2 2018-08-08 11:22:52 -05:00
Erik Johnson
9338370477
Add unit tests for loader optimization levels 2018-08-08 11:22:52 -05:00
rallytime
9f0b9a1073
Update expected return value in boto test
The expected return from moto has changed from `-1` to `None` in the
latest version of moto (1.3.4). This PR updates the test to be in line
with the return from moto.
2018-08-08 10:44:38 -04:00
rallytime
1a23bb233f
Update expected return value in boto test
The expected return from moto has changed from `-1` to `None` in the
latest version of moto (1.3.4). This PR updates the test to be in line
with the return from moto.
2018-08-08 10:42:57 -04:00
rallytime
d0136b1be5
Update expected return value in boto test
The expected return from moto has changed from `-1` to `None` in the
latest version of moto (1.3.4). This PR updates the test to be in line
with the return from moto.
2018-08-08 09:16:55 -04:00
Nicole Thomas
ab1a713bc3
Merge pull request #48934 from terminalmage/issue48777
Properly handle latin-1 encoding in file diffs
2018-08-07 17:02:23 -04:00
twangboy
47b2898a85
return empty dict on no changes 2018-08-07 12:25:15 -06:00
Erik Johnson
52c64e4d51
Fix to_unicode test
Since latin-1 is not being automatically decoded, we need to explicitly
pass it on the test.
2018-08-07 09:57:21 -05:00
twangboy
6532706d2f
Make the tests run on Linux 2018-08-06 17:55:46 -06:00
twangboy
cfe55a391a
Add tests for pkg.install output 2018-08-06 17:53:37 -06:00
Erik Johnson
d39fa889f3
Add stringutils.get_diff to mocks 2018-08-06 15:27:13 -05:00
Erik Johnson
f14f4dae22
Add unit test for latin-1 fallback, multi-encoding 2018-08-03 18:38:08 -05:00
Nicole Thomas
0272cadff8
Merge branch '2018.3' into unit_state 2018-08-03 16:30:28 -04:00
Ch3LL
b82dd708be
skip getpwnam check on mac in unit test_cmdmod 2018-08-02 16:39:49 -04:00
Ch3LL
5896c7fc36
remove base_top_file file in teardown and add sleep 2018-08-02 16:05:41 -04:00
Gareth J. Greenaway
0791b0a03c
FileGrepTestCase tests back to 2018.3 2018-07-31 09:33:58 -07:00
Gareth J. Greenaway
2e01c55e7e
Fixing a bug that prevents specifying wildcards for filenames. 2018-07-31 09:33:58 -07:00
Daniel Wozniak
69f81214d1
Merge pull request #48714 from dwoz/state_echo_fix
Always transfer bytes from fileserver roots
2018-07-30 15:37:12 -07:00
Daniel A. Wozniak
ce3ed43dab
Always use unix line endings 2018-07-30 11:41:58 -07:00
Erik Johnson
52fc1c955d
Simplify file contents in roots fileserver test
This removes the need to hard code contents in the test. The roots
fileserver just reads from the file in binary mode, so we should be able
to do the same in the test to confirm the correct behavior of the roots
backend.
2018-07-27 09:16:59 -05:00
Nicole Thomas
6978ce5d1d
Merge pull request #48747 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-07-26 14:14:33 -04:00
Daniel A Wozniak
a89019e956
Multiple windows test fixes 2018-07-24 23:09:14 -07:00
rallytime
4122da40b5
Merge branch '2017.7' into '2018.3'
Conflicts:
  - tests/integration/netapi/rest_tornado/test_app.py
  - tests/integration/states/test_service.py
2018-07-24 14:28:33 -04:00
Nicole Thomas
062fe7cccf
Merge pull request #48718 from garethgreenaway/48536_beacon_diskusage_fixes
[2018.3] beacon diskusage fixes
2018-07-24 13:45:25 -04:00
Nicole Thomas
e873621009
Merge pull request #48711 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-07-24 13:38:57 -04:00
Daniel Wozniak
04ab17a4d6
Merge pull request #48726 from dwoz/syslogtest
Skip test when syslog not available
2018-07-24 09:12:44 -07:00
Daniel A. Wozniak
6e7824266b
Windows compatible cp test 2018-07-23 23:27:29 -07:00
Daniel A. Wozniak
00f04cfd59
Skip test when syslog not available 2018-07-23 23:11:42 -07:00
Daniel A. Wozniak
95329acb1e
Fileserver transfers bytes 2018-07-23 13:24:47 -07:00
Gareth J. Greenaway
38a65e8fb3
Fixing test_diskusage_nomatch and test_diskusage_match_regex 2018-07-23 11:02:57 -07:00
Gareth J. Greenaway
6ecca166ff
Updating psutil.disk_partitions to pull in all mounts not just the physical ones. Check to see if the mount point from the configuration ends with a $ (regular expression end of line) if not we add one in to ensure that a simple / does not end up matching all mount points. Updating tests accordingly. 2018-07-23 11:02:57 -07:00
Nicole Thomas
801eae3b8d
Merge pull request #48672 from frogunder/45012
add service enabled test
2018-07-23 11:38:48 -04:00
rallytime
ea5c063237
Update old utils paths to use new paths 2018-07-23 11:32:08 -04:00
rallytime
e740d3b208
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/client/ssh/state.py
  - salt/client/ssh/wrapper/state.py
  - salt/modules/dockermod.py
  - salt/modules/npm.py
  - salt/modules/testinframod.py
  - tests/integration/modules/test_mac_system.py
  - tests/integration/modules/test_mac_timezone.py
  - tests/integration/ssh/test_state.py
  - tests/integration/states/test_user.py
  - tests/unit/modules/test_npm.py
  - tests/unit/states/test_file.py
2018-07-23 11:15:43 -04:00
Alexander Duryagin
ebcd3b1c6b
fixed test for svn.export 2018-07-23 10:58:48 -04:00
Nicole Thomas
ead19725b6
Merge branch '2017.7' into fix_48169 2018-07-20 10:45:59 -04:00
Nicole Thomas
dfc1582475
Merge pull request #48304 from Ch3LL/swap_mac
Fix macosx grains when swapusage returns comma
2018-07-20 10:30:58 -04:00
Frode Gundersen
0747f2e58a
add service enabled test 2018-07-19 16:47:56 +00:00
William Yardley
7ff3c9c5ff
Improve handling of npm json output (#43138)
Rather than look for [ or { at the beginning of a line to identify the json
output, just use salt.utils(.json).findjson.
2018-07-18 21:42:28 -07:00
Nicole Thomas
6973152057
Merge pull request #48534 from xetix/fix-zypper-latest_version
Fix behaviour of function latest_version in zypper module when multip…
2018-07-13 15:56:05 -04:00
Nicole Thomas
9985f0b4c1
Lint: remove extra blank line 2018-07-13 15:55:08 -04:00
Nicole Thomas
4b16537a29
Merge pull request #48579 from Ch3LL/fix_syslog
Fix python2 syslog returner expecting string bytes not unicode
2018-07-13 15:50:15 -04:00
Daniel A Wozniak
136ddf5f54
Finally fix prepend for real 2018-07-13 11:25:27 -07:00
Ch3LL
d8288a0ffc
add unicode type for syslog test for tag 2018-07-13 12:39:09 -04:00
Ch3LL
17e69382d5
Fix python2 syslog returner expecting string bytes not unicode 2018-07-13 12:35:41 -04:00
Daniel A Wozniak
66b25e65bf
Fix failing prepend test
The prepend test is failing when jenkins runs kithchen but is passing in
my test environment. Make sure each test starts without the 'etc' path
existing.
2018-07-12 19:04:47 -07:00
Patrik
5fbead8a36
Merge branch '2017.7' into fix-zypper-latest_version 2018-07-12 21:05:54 +02:00
xetix
db35d0c1e1 Adding testcase for this fix. 2018-07-12 20:58:16 +02:00
Daniel A Wozniak
c858bf477f
Remove which mock to get the test passing
This test passes in my local kitchen tests when the which mock is
removed. However, I added this mock to try and get the test passing in
jenkins. The original failure that caused me to add it was removed from
jenkins. This will either fix the test or reveal the other error that
needs to be fixed.
2018-07-12 11:14:47 -07:00
rallytime
8bc71688ea
Remove /sr.* pattern from test
/sr.* pattern should raise exception
2018-07-12 11:24:44 -04:00
rallytime
5e2e2a63fa
Update file unit tests to handle "writelines" change
Since file.line is now using "writelines()" instead of "write()", we
need to handle the unittests accordingly.
2018-07-12 11:12:22 -04:00
rallytime
d0b6e82ecb
Add 'name' as the passed in filepath for test_line_insert_ensure_before_first_line test
With 'foo', the test fails with an unknown file KeyError - we need to use the "name"
variable instead.

Fixes the test_line_insert_ensure_before_first_line test.
2018-07-12 11:11:47 -04:00
rallytime
d8920cb61f
Update test_line_insert_ensure_before_first_line to use new mock_open methodologies 2018-07-12 11:11:32 -04:00
Jerzy Drozdz
adfa3aed0d
Empty match on delete or replace not causing IndexError exception 2018-07-10 09:20:23 -04:00
Jerzy Drozdz
d2af81e9c7
Make integration green. Added test for mode ensure insert before first line 2018-07-10 09:19:55 -04:00
Jerzy Drozdz
3af551ebe1
/sr.* pattern should raise exception 2018-07-10 09:17:49 -04:00
Jerzy Drozdz
935a9b9d56
test_line_insert_end fixed 2018-07-10 09:14:18 -04:00
rallytime
54341d1a8d
Update old utils paths to use new utils paths 2018-07-09 10:34:38 -04:00
rallytime
68aabff0cf
Merge branch '2017.7' into '2018.3'
Conflicts:
  - pkg/windows/req.txt
  - salt/netapi/rest_tornado/saltnado.py
  - salt/utils/versions.py
  - tests/integration/states/test_file.py
2018-07-09 10:27:58 -04:00
Nicole Thomas
2baa7f189f
Merge pull request #48431 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-07-05 13:22:59 -04:00
slivik
70144bccbb
Fixes dry run in ini_manage + Fixes related bug - when working with options which are not in section. + Fixes related tests + Fixes pylint warnings 2018-07-04 09:19:36 +02:00
Nicole Thomas
a7e52f0de2
Merge pull request #48429 from rallytime/bp-46824
Back-port #46824 to 2017.7
2018-07-03 17:45:36 -04:00
Daniel A. Wozniak
349a2b279e
Prepend test needs file.touch method 2018-07-03 13:32:02 -07:00
rallytime
3e59dda0b1
Merge branch '2017.7' into '2018.3'
No conflicts.
2018-07-03 16:09:28 -04:00
Beorn Facchini
8b4486248d
Added ignore_retcode to mock unit tests 2018-07-03 16:05:04 -04:00
Nicole Thomas
83e387c951
Merge pull request #48410 from dwoz/service_dead_test_fix
Fix service dead test on windows
2018-07-03 10:17:28 -04:00
Daniel A. Wozniak
5c0923448d
Fix service dead test on windows 2018-07-02 12:03:03 -07:00
Daniel A. Wozniak
9c7085b70f
Fix file state prepend test 2018-07-02 11:30:55 -07:00
Daniel Wozniak
10e93bff7f
Merge pull request #48396 from dwoz/symlink_test_fix
Fix file.symlink state test for windows
2018-07-02 11:10:31 -07:00
Nicole Thomas
5b38019ca0
Merge pull request #48339 from terminalmage/backport-tojson-filter
Backport tojson filter from #48309 to 2018.3
2018-07-02 13:52:52 -04:00
Nicole Thomas
d3c658bdcf
Merge pull request #48358 from Ch3LL/m2crypto_fix
Fix corrupt public key with m2crypto python3
2018-07-02 09:10:31 -04:00
Daniel A. Wozniak
d3456d31e6
Fix file.symlink state test for windows 2018-06-30 15:44:58 -07:00
rallytime
c4fd2a0930
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/modules/rabbitmq.py
  - tests/integration/modules/test_pip.py
2018-06-30 09:33:21 -04:00
Ch3LL
8fdd34d430
m2crypto open file in rb mode for pub key 2018-06-29 14:43:06 -04:00
twangboy
77629f640a
Fix module unit tests 2018-06-29 11:15:23 -06:00
Ch3LL
a964db4663
Fix corrupt public key with m2crypto python3 2018-06-28 11:31:21 -04:00
twangboy
707906ac15
Fix unit.state.test_powercfg
Add test for test=True
2018-06-27 16:06:58 -06:00
twangboy
32c5014eb6
Fix unit tests 2018-06-27 16:06:57 -06:00
Erik Johnson
c636b18cf0
Add unit test for tojson filter 2018-06-27 12:23:29 -05:00
Ch3LL
5d6135e1e2
Fix macosx grains when swapusage returns comma 2018-06-25 18:03:57 -04:00
rallytime
c7bb8a50b0
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/modules/x509.py
  - salt/runners/cloud.py
  - tests/unit/modules/test_state.py
2018-06-25 10:41:06 -04:00
Nicole Thomas
27a0e95174
Merge pull request #48279 from terminalmage/mock_open-docs
Add documentation/further enhancements to rewritten mock_open
2018-06-25 09:12:29 -04:00
Erik Johnson
830a624ce8
Ignore IOError when tearing down filehandles not opened for reading 2018-06-23 21:28:34 -05:00
Erik Johnson
a13d1fe1a0
Update mock_open usage to reflect read_data type enforcement 2018-06-23 15:04:47 -05:00
Erik Johnson
374a8ce31f
Add more mock_open tests 2018-06-23 15:04:24 -05:00
Erik Johnson
0f06adb008
Improve code-reuse in mock_open tests 2018-06-23 15:04:06 -05:00
Nicole Thomas
09b036c26e
Merge pull request #48228 from garethgreenaway/48204_mysql_user_password_exception
[2018.3] Fixes to mysql module
2018-06-22 11:43:59 -04:00
Nicole Thomas
731ec0a11a
Merge pull request #48037 from terminalmage/fix-custom-types-sync-docs
Add "sync_mods" argument to state.apply/state.sls
2018-06-21 15:57:02 -04:00
rallytime
84ec655c24
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/ref/configuration/minion.rst
  - salt/minion.py
  - salt/modules/dockermod.py
  - salt/modules/lxc.py
  - salt/utils/__init__.py
  - tests/unit/modules/test_mount.py
2018-06-21 14:22:15 -04:00
Nicole Thomas
51928ff050
Merge pull request #48166 from terminalmage/salt-jenkins-1000
Add trace logging and optimize file handling in grains.core.os_data
2018-06-21 14:02:32 -04:00
Erik Johnson
8b1bd0eda2
Update test to reflect changed argument name 2018-06-21 11:39:12 -05:00
Gareth J. Greenaway
1b2ffcef1d
Updating the mysql module to not use the PASSWORD when MySQL is version 8.0.11 or higher, where the PASSWORD function has been removed. 2018-06-20 11:41:14 -07:00
Nicole Thomas
6072d1ef9c
Merge pull request #48216 from Ch3LL/grains_unicode
Fix UnicodeDecodeError when reading file to determine virtual grain
2018-06-20 12:53:40 -04:00
Nicole Thomas
de614d31f5
Merge pull request #48209 from rallytime/bp-47986
Back-port #47986 to 2018.3
2018-06-20 09:44:16 -04:00
Ch3LL
c4334f3f14
Fix UnicodeDecodeError when reading file to determine virtual grain 2018-06-19 16:38:28 -04:00
rallytime
dae65da256
Merge branch '2018.3.1' into '2018.3' 2018-06-19 14:56:06 -04:00
J. Eduardo
f4b3bd5d2c
Changed salt.utils.fopen to salt.utils.files.fopen 2018-06-19 14:30:54 -04:00
J. Eduardo
8686872909
Fixed typos, removed repeated unit tests, and applied code fixes suggested by linter. 2018-06-19 14:30:48 -04:00
J. Eduardo
5aa99d14c4
Added unit tests for CRL creation and certificate revocation with CRL 2018-06-19 14:30:38 -04:00
Nicole Thomas
71e385501b
Merge pull request #48165 from terminalmage/issue48144
Fix regression with top_file_merging_strategy=same
2018-06-19 14:03:06 -04:00
Erik Johnson
b73df0ab00
Change call_args to call.args to reflect changes to MockFH 2018-06-18 16:57:51 -05:00
Erik Johnson
0c2cc07704
remove unused import 2018-06-18 16:55:19 -05:00
Nicole Thomas
e079fce38d
Merge pull request #48190 from terminalmage/fix-vfstab-test
Fix mount.vfstab unit test
2018-06-18 17:47:54 -04:00
Erik Johnson
b8c0a55cf3
Add test for tell() 2018-06-18 16:24:44 -05:00
Erik Johnson
efb8f49d42
Add tests for read_data being a list, and containing unicode or bytestrings 2018-06-18 14:48:53 -05:00
Erik Johnson
71eeae1240
Update mount module unit tests to reflect changes in mock_open 2018-06-18 13:39:52 -05:00
Erik Johnson
8d70d14362
Fix mount.vfstab unit test
This test was calling mount.fstab() instead of mount.vfstab()
2018-06-18 13:21:40 -05:00
Erik Johnson
16c414e120
Update nfs3 module tests to reflect changes in mock_open 2018-06-18 12:28:38 -05:00
Erik Johnson
b7eab25d6c
Update grub_legacy module tests to reflect changes in mock_open 2018-06-18 12:21:33 -05:00
Erik Johnson
cc002b8fd7
Update new network unit test to reflect changes in mock_open 2018-06-18 12:13:49 -05:00
Erik Johnson
a8f11594f1
Update new core grains tests to reflect changes in mock_open 2018-06-18 11:53:59 -05:00
Erik Johnson
84ce18d956
Update crypt unit tests to reflect changes in mock_open 2018-06-18 10:38:53 -05:00
Erik Johnson
67c036dc2d
Add MockCall to tests.support.mock to track calls 2018-06-18 10:34:33 -05:00
Erik Johnson
2556a1e13d
Remove unused import 2018-06-18 07:23:52 -05:00
Erik Johnson
6acb4c83ec
Update newly added test to reflect renaming of handles attribute 2018-06-18 00:22:43 -05:00
Erik Johnson
77e5288d42
Update fibre_channel grains tests to reflect changes in mock_open 2018-06-18 00:21:26 -05:00
Erik Johnson
ed40371a06
Update timezone module tests to reflect changes in mock_open 2018-06-18 00:21:26 -05:00
Erik Johnson
2598d2453a
Update snapper module tests to reflect changes in mock_open 2018-06-18 00:21:26 -05:00
Erik Johnson
55487c175c
Fix mock_open call to use new multifile syntax 2018-06-18 00:21:26 -05:00
Erik Johnson
7f516ef73a
Update puppet module tests to reflect changes in mock_open 2018-06-18 00:21:26 -05:00
Erik Johnson
33a97c4ecc
Update btmp beacon tests to reflect changes in mock_open 2018-06-18 00:21:26 -05:00
Erik Johnson
bc027cfa94
Update wtmp beacon tests to reflect changes in mock_open 2018-06-18 00:21:26 -05:00
Erik Johnson
7eb4b1ae1c
Update cp.push test to reflect changes to mock_open 2018-06-18 00:21:25 -05:00
Erik Johnson
4b5a393445
Update junos tests to reflect changes to mock_open 2018-06-18 00:21:25 -05:00
Erik Johnson
278a222b09
Update dnsutil tests to reflect changes to mock_open 2018-06-18 00:21:25 -05:00
Erik Johnson
4e67955572
Replace the rest of mock_open with a class 2018-06-18 00:21:25 -05:00
Erik Johnson
75307a47c5
Update linux_sysctl tests to reflect changes to mock_open 2018-06-18 00:21:25 -05:00
Erik Johnson
05c68fd5d9
Use explicit config file and fix remaining mac_sysctl tests
This updates test_persist_success to work with the new mocked filehandle
support. Additionally, it fixes incorrect invocation of
`mac_sysctl.persist()`; the `config` argument is supposed to be a file
path, not a string config text.
2018-06-18 00:21:25 -05:00
Erik Johnson
675f03c58f
Update mac_sysctl tests to reflect new mock_open behavior 2018-06-18 00:21:24 -05:00
Erik Johnson
3d2c41d395
Update file module tests to reflect new mock_open behavior 2018-06-18 00:21:24 -05:00
Erik Johnson
f6b46bc608
Remove unused import 2018-06-18 00:16:02 -05:00
Erik Johnson
48d7cfa6d3
Add multifile tests for mock_open 2018-06-18 00:16:02 -05:00
Erik Johnson
cb2620ad2b
Update core grains tests to reflect EAFP changes 2018-06-18 00:16:02 -05:00
Erik Johnson
6a0828beed
Add unit tests for mock_open 2018-06-18 00:16:02 -05:00
Erik Johnson
9af09e0127
Mock config.get due to changes in _refresh_mine_cache 2018-06-18 00:05:25 -05:00
Erik Johnson
d403ae58d7
Add unit test for docker.update_mine 2018-06-17 21:42:28 -05:00
Nicole Thomas
85ebcbd3f2
Merge pull request #48156 from garethgreenaway/48113_ensure_writing_strings_with_file_dot_line
[2018.3] Unicode fixes for file.line
2018-06-17 15:34:07 -04:00
Erik Johnson
92ac2a2d6a
Remove unused imports 2018-06-15 17:45:56 -05:00
Erik Johnson
15a44d5dd4
Remove redundant top file merging tests
These were intrinsically flawed since they only tested the merge
functions themselves, and not the rest of the state compiler. They have
been replaced by the tests in unit.modules.test_state.TopFileMergingCase.
2018-06-15 17:42:38 -05:00
Erik Johnson
12100d9bd3
Add more top file merging tests 2018-06-15 17:40:44 -05:00
rallytime
398cc78224
Merge branch '2017.7' into '2018.3'
Conflicts:
  - .kitchen.yml
  - doc/topics/releases/2017.7.6.rst
  - salt/modules/timezone.py
  - tests/support/case.py
  - tests/unit/modules/test_timezone.py
2018-06-15 16:51:45 -04:00
Nicole Thomas
9aa9a83b10
Merge pull request #48155 from max-arnold/2018.3
Do not fail on empty saltclass classes (fix for #48145)
2018-06-15 16:21:27 -04:00
Erik Johnson
0ed686cb3f
Add unit test for show_top with "same" merging strategy 2018-06-15 14:11:15 -05:00
Gareth J. Greenaway
5a9ef0d1ae
Unless we're using py2 and Windows, ensure we're writing out a string when using file.line. 2018-06-15 11:38:31 -07:00
Nicole Thomas
df2a156338
Merge pull request #48061 from garethgreenaway/port_47049_2017_7
[2017.7] Porting #47049 to 2017.7.
2018-06-15 13:15:49 -04:00
Nicole Thomas
152c09cc0c
Merge pull request #48104 from twangboy/fix_test_win_status
Fix `unit.modules.test_win_status`
2018-06-15 13:05:33 -04:00
Max Arnold
3d4fcbe3aa Add test for issue #48145 2018-06-15 23:48:14 +07:00
Nicole Thomas
c05c176782
Merge pull request #48081 from terminalmage/issue48012
Fix UnicodeDecodeError when parsing hosts file with non-ascii
2018-06-15 08:41:12 -04:00
Erik Johnson
8d2fb0bf25
Fix cp.push test
mock_open now properly handles bytestrings, so the expected data needed
to be updated.
2018-06-14 15:23:54 -05:00
Erik Johnson
e230a7223f
Fix definition of test data for wtmp/btmp beacon tests
There is no need to do things differently on PY2 and PY3
2018-06-14 15:23:40 -05:00
Mike Place
4b6f1c7f75
Merge pull request #48077 from twangboy/fix_parsers
Fix issue with `salt.utils.parsers` on Windows
2018-06-14 18:22:56 +02:00
Erik Johnson
54f9a2ab54
Remove unused import 2018-06-13 21:11:14 -05:00
Erik Johnson
767cc7e87f
fix tabs 2018-06-13 21:10:30 -05:00
Erik Johnson
db19636f56
Get rid of additional newline append
This looks like it was just incorrectly done before. writelines()
expects you to take care of newlines yourself, so each element should
end in a newline. But we were doing two separate writes, one with the
key=value pair and one with a newline
2018-06-13 15:17:56 -05:00
Erik Johnson
7427e192ba
Fix more crappy mocking 2018-06-13 15:01:12 -05:00
Erik Johnson
4eaa5789ce
Fix crappy mocking
This mocking was poorly done, which was revealed when I made an EAFP
modification to _generate_minion_id().
2018-06-13 14:11:44 -05:00
twangboy
1ec3f436ee
Fix test_error_logged_if_process_get_owner_fails 2018-06-13 12:46:20 -06:00
twangboy
d26fc56f13
Use os.sep for paths 2018-06-13 12:04:37 -06:00
Gareth J. Greenaway
7c472fed51
Fixing failing test_set_hwclock_aix test. 2018-06-13 10:15:28 -07:00
Gareth J. Greenaway
ccb0acc958
Porting #47049 to 2017.7. 2018-06-13 10:15:28 -07:00
Erik Johnson
6fe711ad76
Reverse monkeypatching after test_symlink_list finishes
On Windows, in test_symlink_list we monkeypatch the file_roots. However,
we don't ever reverse that monkeypatching.

This would not have affected other test classes, because the opts we are
monkeypatching are ones created specifically for that test class. And
due to the lexicographic order in which the tests are run,
test_symlink_list is run last. However, if we were to ever add a test to
that test class which would run after test_symlink_list, it would be
affected by the monkeypatching.
2018-06-13 09:58:29 -05:00
Erik Johnson
248467edac
Add regression test for _generate_minion_id() 2018-06-13 01:13:43 -05:00
twangboy
0e99dd741c
Fix logic for non-root 2018-06-12 17:45:19 -06:00
twangboy
2d2534a688
Fix parsers for Windows, fix tests 2018-06-12 17:26:40 -06:00
rallytime
3d2ea16c3a
Merge branch '2017.7' into '2018.3'
Conflicts:
  - requirements/base.txt
  - salt/states/archive.py
  - salt/states/file.py
  - tests/integration/runners/test_state.py
  - tests/unit/daemons/test_masterapi.py
2018-06-11 11:45:37 -04:00
Erik Johnson
cb8e6f9fb8
Remove redundant mocking
This mocking was added to setup_loader_modules and is no longer needed
in individual tests.
2018-06-08 12:26:31 -05:00
Erik Johnson
bc3ad795e9
Add test for sync argument to state.sls 2018-06-08 12:22:50 -05:00
Daniel Wozniak
1ce7d6c38a
Merge pull request #47989 from dwoz/awscloud
Properly decode password from aws using m2crypto
2018-06-06 13:44:28 -07:00
Daniel Wallace
8d15b93d00
remove tox virtualenvs from doc tests 2018-06-06 12:22:22 -05:00
Nicole Thomas
605463ca0d
Merge pull request #47998 from rallytime/bp-47989
Back-port #47989 to 2018.3.1
2018-06-06 13:08:03 -04:00
Daniel A. Wozniak
23ab2727be
Fix linter errors 2018-06-06 09:43:04 -07:00
Nicole Thomas
9d56af3cad
Merge pull request #47982 from twangboy/fix_test_win_dns_client
Fix `unit.modules.test_win_dns_client` tests
2018-06-06 11:02:10 -04:00
rallytime
1b7e9ac2d3
Lint fixes 2018-06-06 09:44:10 -04:00
Daniel A. Wozniak
0545152ddd
Properly decode password from aws using m2crypto
Fixes issue #47955
2018-06-06 09:44:05 -04:00
Daniel A. Wozniak
6c8daa2b85
Properly decode password from aws using m2crypto
Fixes issue #47955
2018-06-05 22:27:36 -07:00
twangboy
4ce551811f
Remove the unnecessary to_unicode stuff 2018-06-05 17:49:22 -06:00
Daniel Wallace
556a2067fc
fix masterapi test to use testing directory for configs 2018-06-05 18:36:27 -05:00
twangboy
863ded39fa
Mock reg.cast_vdata 2018-06-05 15:38:28 -06:00
twangboy
2dcdf6788c
Force string to ModuleType 2018-06-05 15:27:12 -06:00
Gareth J. Greenaway
329b2e5956
Ensuring that when a passphrase is passed in, it is returned as a string from the passphrase callback. 2018-06-05 09:29:03 -04:00
Gareth J. Greenaway
e22df8473d
Ensuring that when a passphrase is passed in, it is returned as a string from the passphrase callback. 2018-06-04 16:00:54 -07:00
Nicole Thomas
a46e42ab11
Merge pull request #47927 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-06-04 14:55:11 -04:00
L4rS6
6d7ef27557
Merge branch '2018.3' into fix-broken-rabbitmq-list-policies 2018-06-04 10:59:30 +02:00
Lars Wagner
e043ea2833 refactored list_policies code and added more tests 2018-06-04 10:56:12 +02:00
rallytime
3273bbdab7
Merge branch '2017.7' into '2018.3'
Conflicts:
  - doc/ref/configuration/master.rst
  - doc/ref/modules/all/index.rst
  - doc/topics/grains/index.rst
  - doc/topics/releases/2016.3.4.rst
  - doc/topics/spm/spm_formula.rst
  - doc/topics/tutorials/cron.rst
  - doc/topics/tutorials/index.rst
  - doc/topics/tutorials/stormpath.rst
  - salt/engines/slack.py
  - salt/log/handlers/fluent_mod.py
  - salt/modules/cyg.py
  - salt/modules/junos.py
  - salt/modules/namecheap_dns.py
  - salt/modules/namecheap_domains.py
  - salt/modules/namecheap_ns.py
  - salt/modules/namecheap_ssl.py
  - salt/modules/namecheap_users.py
  - salt/modules/reg.py
  - salt/modules/tomcat.py
  - salt/modules/vault.py
  - salt/modules/win_file.py
  - salt/modules/zpool.py
  - salt/output/highstate.py
  - salt/renderers/pass.py
  - salt/runners/cache.py
  - salt/states/boto_apigateway.py
  - salt/states/boto_iam.py
  - salt/states/boto_route53.py
  - salt/states/msteams.py
  - salt/states/reg.py
  - salt/states/win_iis.py
  - tests/integration/modules/test_cmdmod.py
  - tests/integration/states/test_user.py
  - tests/support/helpers.py
  - tests/unit/cloud/clouds/test_openstack.py
  - tests/unit/fileserver/test_gitfs.py
  - tests/unit/modules/test_junos.py
  - tests/unit/pillar/test_git.py
  - tests/unit/states/test_win_path.py
  - tests/unit/test_pillar.py
  - tests/unit/utils/test_format_call.py
  - tests/unit/utils/test_utils.py
  - tests/unit/utils/test_warnings.py
2018-06-01 14:54:12 -04:00
Erik Johnson
8cb33d3dec
Quiet the linter
We need this import to determine whether we have the needed modules to
run the test, even though it is not invoked directly.
2018-05-31 15:28:25 -05:00
Erik Johnson
91cd57d1e0
Update mocking to reflect changes in service module 2018-05-31 15:28:25 -05:00
Erik Johnson
b9ace5a859
Fix crappy mocking
This fixes some poorly-conceived mocking that was done because of some
equally dumb imports being done in salt/modules/junos.py (which I fixed
a few commits ago while in the process of cleaning up the docs).
2018-05-31 15:28:25 -05:00
Erik Johnson
bc9e3acef3
Lint fixes 2018-05-31 15:28:25 -05:00
Erik Johnson
93ee5ee2b0
Fix all Sphinx warnings
Well, all but one, which we expect to see
2018-05-31 15:28:25 -05:00
Nicole Thomas
0d229c6182
Merge branch '2018.3' into fix_47559 2018-05-31 11:28:30 -04:00
Nicole Thomas
b4bac9b41b
Merge pull request #47868 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-05-30 17:20:37 -04:00
rallytime
e5d386e91c
Update solaris core grains test
The check for zpool grains was moved out of core grains and into
zfs grains. The mock for the call to zpool grains function was failing.

We also need to update any calls to the salt.utils file to use the new
paths.
2018-05-30 13:50:22 -04:00
rallytime
267f09c1a0
Lint: Remove unused import 2018-05-29 13:56:15 -04:00
rallytime
120ee16b70
Replace old utils paths with new utils paths 2018-05-29 11:19:34 -04:00
rallytime
dc32b67c03
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/modules/win_snmp.py
  - tests/integration/modules/test_saltutil.py
  - tests/integration/states/test_pkg.py
  - tests/support/helpers.py
  - tests/support/runtests.py
  - tests/unit/fileserver/test_gitfs.py
  - tests/whitelist.txt
2018-05-29 11:14:39 -04:00
Travis Paul
d50c0ab96b
Lint test_pkgin.py 2018-05-29 10:10:43 -04:00
Travis Paul
4dac0b4a31
pkgin latest_version bugfix
Handle case where the currently installed package is the latest
2018-05-29 10:10:43 -04:00