Anthony Shaw
25427d845e
convert key iterator to list as python 3 wont index an iterator
2017-11-22 08:10:36 +00:00
Anthony Shaw
ba0280e727
linting updates
2017-11-11 15:25:36 +02:00
Anthony Shaw
78b90f3d0c
add remaining tests
2017-11-11 15:21:24 +02:00
Anthony Shaw
386c4e5791
add tests for all the getters
2017-11-11 14:55:25 +02:00
Anthony Shaw
c63222358b
update tests with correct assertions and mock methods on device instance
2017-11-06 05:01:31 +02:00
Anthony Shaw
b69c559c52
fix kwargs typo
...
setup basic unit test class
update wrapper
2017-11-06 04:39:30 +02:00
Nicole Thomas
b2b0c770a4
Merge pull request #44279 from rallytime/merge-2017.7
...
[2017.7] Merge forward from 2016.11 to 2017.7
2017-10-27 12:17:18 -04:00
twangboy
6db23757bc
Fix test_pydsl on Windows
...
Fix salt.utils.fopen to handle the 't' mode correctly in Windows
Fix the test_pysl test issues with spacing and file paths
2017-10-26 10:18:07 -06:00
rallytime
055b0701de
Lint fix from sloppy merge conflict resolution
2017-10-25 11:58:44 -04:00
rallytime
1c3cb5c6a4
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- .gitignore
- tests/unit/states/test_file.py
2017-10-25 10:04:08 -04:00
twangboy
609361bf48
Fix some lint errors
2017-10-24 09:27:39 -06:00
twangboy
7a3ff9387d
Mock the rest of the tests
2017-10-24 09:27:38 -06:00
Erik Johnson
5ce14df82c
Change how members are retrieved in win_groupadd
...
This is a solution that works for the other functions that interact with
group objects, making it a better overall solution to be used widely
in win_groupadd.
This also updates the mocking in the tests such that we use a more
comprehensive fake class, and more intelligent mocking of get_sam_name
using a lambda.
2017-10-24 09:27:38 -06:00
twangboy
6ab82394be
Set up mocking
...
Move the code that sets up the group object, computer object and gets
existing members out of the individual functions so they can be mocked
Mock the GroupObj
Mock the ComputerObj
Mock existing members
Still need to fix info, getent, and members
2017-10-24 09:27:37 -06:00
Nicole Thomas
304dd2529d
Merge pull request #44160 from gtmanfred/directory
...
add changes to test return
2017-10-23 10:35:20 -04:00
Nicole Thomas
c6d27ada51
Merge pull request #43843 from twangboy/win_unit_test_mount
...
Fix `unit.states.test_mount` for Windows
2017-10-20 10:27:25 -04:00
Daniel Wallace
a7d3d668f4
missed removing changes in the next test
2017-10-20 08:11:44 -06:00
twangboy
a862e0bf2d
Remove unneeded import
2017-10-19 13:30:16 -06:00
twangboy
d78f27466d
Fix unit.states.test_mount
for Windows
...
Use `os.path.realpath` to convert paths
Mock `os.path.exists`
2017-10-19 13:30:16 -06:00
twangboy
64d2e4f732
Fix pickling errors on Windows
...
Moves the 4 sub functions to the global scope
2017-10-19 11:50:23 -06:00
Daniel Wallace
ac0b5ec440
fix test
2017-10-19 09:28:59 -06:00
twangboy
bb1d2eb85b
Skip tests that are failing on PAM eauth
2017-10-18 14:03:10 -06:00
Mike Place
afcaa0c591
Merge pull request #43913 from twangboy/win_fix_test_jinja
...
Fix `unit.templates.test_jinja` for Windows
2017-10-17 15:09:04 -06:00
Mike Place
fc5754c6a1
Merge pull request #43917 from twangboy/win_unit_test_pillar
...
Fix `unit.test_pillar` for Windows
2017-10-17 15:06:45 -06:00
Matthew Summers
bebf301976
fixed test addressing issue #43307 , disk.format_ to disk.format
2017-10-16 16:35:57 -04:00
Nicole Thomas
68974aa74d
Merge pull request #44029 from msummers42/2017.7
...
addresses issue #43307 , disk.format_ to disk.format
2017-10-16 15:59:19 -04:00
Nicole Thomas
9fe94d7843
Merge pull request #44098 from twangboy/win_mock_test_parsers
...
Return multiprocessing queue in LogSetupMock class
2017-10-16 14:14:29 -04:00
twangboy
a4e2d8059d
Fix unit.templates.test_jinja
for Windows
...
Fix problem with files that end with new line on Windows
Fix some problems with regex
Fix some unicode conversion issues
2017-10-16 10:41:36 -06:00
Matthew Summers
16e1c1dfc8
fixed test addressing issue #43307 , disk.format_ to disk.format
2017-10-16 09:47:40 -05:00
twangboy
caf086c05a
Skip Master, Minion, and Syndic parser tests
2017-10-13 16:02:01 -06:00
twangboy
cc43ca27af
Return multiprocessing queue in LogSetupMock class
2017-10-13 15:47:19 -06:00
twangboy
00dbba5712
Fix unit.test_pillar
for Windows
...
Use delete=True in NamedTemporaryFile command otherwise the handle to
the file isn't released and the file can't be opened by the actual test.
2017-10-10 13:44:58 -06:00
Erik Johnson
92e05cf1c0
Don't allow path separators in minion ID
2017-10-10 11:03:29 -04:00
Erik Johnson
19481423dd
Don't allow path separators in minion ID
2017-10-10 10:58:42 -04:00
twangboy
254dac7723
Fix unit.utils.test_utils
for Windows
...
Use os agnostic path seps
Mock sys.platform to not return win
2017-10-05 16:47:32 -06:00
rallytime
eaca3291e2
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- tests/unit/modules/test_state.py
2017-10-05 12:09:40 -04:00
Erik Johnson
5d56a03a67
Improve failures for module.run states
...
Bare asserts are zero help in troubleshooting. This commit changes the
tests that uses bare asserts such that they fail with a useful error
mesage as well as the return data from the module.run call.
2017-10-02 10:48:45 -05:00
twangboy
fd1d6c31de
Fix unit.states.test_augeas
for Windows
...
Mock `os.path.isfile` so the test will continue
2017-09-29 12:52:32 -06:00
Mike Place
6f687fdcff
Merge pull request #43779 from twangboy/win_fix_test_state
...
Fix `unit.modules.test_state` for Windows
2017-09-28 16:27:02 +02:00
Mike Place
db0f569f7a
Merge pull request #43782 from twangboy/win_fix_test_virt
...
Fix `unit.modules.test_virt` for Windows
2017-09-28 16:25:15 +02:00
Mike Place
5e29507c21
Merge pull request #43781 from twangboy/win_fix_test_status
...
Fix `unit.modules.test_status` for Windows
2017-09-28 11:06:18 +02:00
Mike Place
05c78ae649
Merge pull request #43785 from twangboy/win_fix_test_znc
...
Fix `unit.modules.test_znc` for Windows
2017-09-28 10:56:10 +02:00
garethgreenaway
1c05e37a66
Merge branch '2017.7' into win_fix_test_zypper
2017-09-27 20:15:18 -07:00
garethgreenaway
7d90721f6b
Merge branch '2017.7' into win_fix_test_znc
2017-09-27 20:14:53 -07:00
twangboy
aafec7ab0e
Fix unit.modules.test_zypper
for Windows
...
Use `os.linesep` for newline in expected return
2017-09-27 16:59:36 -06:00
twangboy
228e74c8e3
Fix unit.modules.test_znc
for Windows
...
Mock the signal object as it's missing SIGUSR1 and SIGHUP on Windows
2017-09-27 16:54:06 -06:00
twangboy
058e50e530
Fix unit.modules.test_win_service
...
Mock `cmd.run`
2017-09-27 16:37:12 -06:00
twangboy
7192332758
Fix unit.modules.test_virt
for Windows
...
Use os agnostic paths
Get system root from salt config
2017-09-27 16:12:05 -06:00
twangboy
16ae8253c1
Mock which, use os.linesep for cmd.run return
2017-09-27 14:41:25 -06:00
twangboy
a64fe75816
Use os agnostic paths
2017-09-27 14:16:39 -06:00