Nicole Thomas
3f888753d4
Merge pull request #43732 from twangboy/win_skip_mac_pkg_tests
...
Skip `unit.stats.test_mac_packages` on Windows
2017-09-27 10:48:07 -04:00
twangboy
b41b9c8378
Skip snapper tests on Windows
2017-09-26 17:12:37 -06:00
twangboy
1c01e06097
Only skip test on Windows
2017-09-26 14:36:12 -06:00
twangboy
ec99a3ce3c
Fix lint error
2017-09-26 14:36:11 -06:00
twangboy
61f8a2f7ff
Skip mac specific tests
2017-09-26 14:36:11 -06:00
Nicole Thomas
2581098595
Merge pull request #43731 from twangboy/win_unit_beacons_test_status
...
Fix `unit.beacons.test_status` for Windows
2017-09-26 12:25:11 -04:00
Nicole Thomas
10f3d47498
Merge pull request #43724 from brejoc/2017.7.kubernetes_delete_test
...
Improved delete_deployment test for kubernetes module
2017-09-26 12:19:30 -04:00
Nicole Thomas
13cc27bdab
Merge pull request #43734 from twangboy/win_unit_test_poudriere
...
Fix `unit.modules.test_poudriere` for Windows
2017-09-26 10:13:46 -04:00
Erik Johnson
d78b9a3294
Merge pull request #41998 from twangboy/win_unit_test_environ
...
Fix `unit.modules.test_environ` for Windows
2017-09-26 07:25:48 -05:00
twangboy
922e60fa67
Add os agnostic paths
2017-09-25 15:25:31 -06:00
twangboy
dc1b36b7e2
Change expected return for Windows
2017-09-25 15:06:44 -06:00
Erik Johnson
5b3be6e8af
Fix failing unit test
2017-09-25 16:06:33 -05:00
twangboy
d73ef44cf6
Mock with uppercase KEY
2017-09-25 09:37:15 -06:00
twangboy
048e16883f
Use uppercase KEY
2017-09-25 09:37:15 -06:00
twangboy
056f3bb4c0
Use with to open temp file
2017-09-25 09:35:25 -06:00
twangboy
716e99c453
Fix py3 bytestring problems
2017-09-25 09:35:24 -06:00
twangboy
543610570c
Fix bytestring issues, fix errored tests
2017-09-25 09:35:24 -06:00
twangboy
9fe83a34a5
Remove old variable declaration
2017-09-25 09:35:23 -06:00
twangboy
c5cf5e92c1
Fix many tests
2017-09-25 09:35:23 -06:00
Jochen Breuer
85b0a8c401
Improved delete_deployment test for kubernetes module
...
This is a follow up of this PR: https://github.com/saltstack/salt/pull/43235
With the fix in PR 43235, we are polling the status of the deletion via
show_deployment. This is now also reflected in the tests with this change.
2017-09-25 17:29:27 +02:00
rallytime
cbae45bec4
Lint: Remove extra line at end of file
2017-09-22 10:33:10 -04:00
rallytime
fca4e5563a
Merge branch '2016.11' into '2017.7'
...
Conflicts:
- salt/modules/win_pkg.py
- tests/unit/utils/test_parsers.py
2017-09-22 09:40:03 -04:00
Mike Place
e6dc4d64df
Merge pull request #43314 from twangboy/win_fix_unit.utils.test_verify
...
Fix `unit.utils.test_verify` for Windows
2017-09-21 16:26:12 -06:00
Jochen Breuer
96f39a420b
Fixed linting
...
Fix for "String format call with un-indexed curly braces".
2017-09-20 16:35:01 +02:00
Jochen Breuer
08fba98735
Fixed several issues with the test
...
* Removed redundant import.
* No longer inheriting from LogSettingsParserTests.
* Replaced test class description with somethin meaninful.
* Fixed identation.
I've also moved the class to the bottom, since all the classes inheriting
from LogSettingsParserTests are in the block above.
2017-09-20 15:37:24 +02:00
Jochen Breuer
3a089e450f
Added tests for pid-file deletion in DaemonMixIn
...
This is a follow up on this PR:
https://github.com/saltstack/salt/pull/43366
Since we can get an OSError durin PIDfile deletion with non-root users, it
would make sense to also test for this. So here are the two test cases.
One with an OSError and the other one without.
2017-09-20 14:34:30 +02:00
Jochen Breuer
d1b5ec098c
Merge branch '2017.7' into improve-async-operation-handling-in-kubernetes-module
2017-09-19 10:44:31 +02:00
Nicole Thomas
9ada7f626c
Merge branch '2017.7' into win_fix_unit.utils.test_verify
2017-09-13 14:22:38 -04:00
Erik Johnson
4243a2211d
Rewrite the reactor unit tests
...
These have been skipped for a while now because they didn't work
correctly. The old tests have been scrapped in favor of new ones that
test both the old and new config schema.
2017-09-13 10:35:23 -05:00
Mike Place
08d102c869
Merge pull request #41943 from twangboy/win_unit_test_local_cache
...
Fix `unit.returners.test_local_cache` for Windows
2017-09-11 15:34:02 -06:00
Mike Place
50ab79f0cb
Merge pull request #43424 from twangboy/win_unit_test_hosts
...
Fix `unit.modules.test_hosts` for Windows
2017-09-11 15:28:41 -06:00
Mike Place
ca091bc8a4
Merge pull request #43438 from rallytime/merge-2017.7
...
[2017.7] Merge forward from 2016.11 to 2017.7
2017-09-11 12:33:38 -06:00
twangboy
c0dc3f73ef
Use sys.platform instead of salt.utils to detect Windows
2017-09-11 12:22:06 -06:00
twangboy
e496d28cbf
Fix unit.utils.test_verify
for Windows
...
Use Windows api to get and set the maxstdio
Change messages to work with Windows
2017-09-11 12:22:06 -06:00
Mike Place
a9592dd3e2
Merge pull request #43320 from twangboy/win_fix_alternatives
...
Fix `unit.modules.test_alternatives` for Windows
2017-09-11 11:27:59 -06:00
Mike Place
9b89e49846
Merge pull request #43363 from twangboy/scratch_ini_tests
...
Fix `unit.modules.test_ini_manage` for Windows
2017-09-11 11:10:30 -06:00
rallytime
ef7b4242c3
Merge branch '2016.11' into '2017.7'
...
No conflicts.
2017-09-11 12:24:10 -04:00
Mike Place
e89e23a32e
Merge pull request #43422 from twangboy/win_unit_cloud_ec2
...
Fix `unit.cloud.clouds.test_ec2` for Windows
2017-09-11 09:17:19 -06:00
twangboy
90dcf8287c
Fix unit.modules.test_hosts
for Windows
...
Fix problem with TmpStringIO Class on Windows. The module uses this
class twice in normal operation. In Windows there's an additional run
before the real runs where it is opened with mode='w'. This causes the
data to be wiped out. So, this sets it to only save the value in the
instance to data if it is not empty.
Use the windows path to the hosts file in Windows
2017-09-08 17:21:01 -06:00
twangboy
b2cea18d13
Fix unit.modules.test_gem
for Windows
...
Mock `salt.utils.is_windows` to return False so the test will run on
Windows
2017-09-08 15:53:07 -06:00
twangboy
1379627334
Fix unit.cloud.clouds.test_ec2
for Windows
...
Mock instead of create tempfile
2017-09-08 15:36:52 -06:00
Alessandro -oggei- Ogier
496f14a7e7
forgot to mock the proper one
2017-09-08 21:37:09 +02:00
Nicole Thomas
97f05ff603
Merge pull request #43398 from twangboy/win_fix_test_mount
...
Fix `unit.modules.test_mount` for Windows
2017-09-08 09:39:28 -04:00
Nicole Thomas
6a4cc5c1b0
Merge pull request #43399 from twangboy/win_fix_test_pam
...
Fix `unit.modules.test_pam` for Windows
2017-09-08 09:37:49 -04:00
Nicole Thomas
2b5cfae3f8
Merge pull request #43400 from twangboy/win_unit_test_parted
...
Fix `unit.modules.test_parted` for Windows
2017-09-08 09:36:59 -04:00
Nicole Thomas
332deeb013
Merge pull request #43401 from twangboy/win_unit_test_pw_group
...
Fix `unit.modules.test_pw_group` for Windows
2017-09-08 09:35:44 -04:00
Nicole Thomas
c0f54bfef1
Merge pull request #43402 from twangboy/win_unit_test_qemu_nbd
...
Fix `unit.modules.test_qemu_nbd` for Windows
2017-09-08 09:34:57 -04:00
Alessandro -oggei- Ogier
70642e495d
better qemu_static parameter mangle in deboostrap management, tests
2017-09-08 10:17:32 +02:00
twangboy
6ceb895a84
Use os.path.join for paths
2017-09-07 16:51:10 -06:00
twangboy
531ce8022b
Fix unit.modules.test_qemu_nbd
for Windows
...
Use os.sep
2017-09-07 15:44:35 -06:00
twangboy
78e39a1b9d
Fix unit.modules.test_pw_group
for Windows
...
Skip `test_info` and `test_getent` because they require grp which is not
available on Windows
2017-09-07 15:34:57 -06:00
twangboy
8e3e897ee2
Fix unit.modules.test_parted
for Windows
...
Mock salt.utils.is_windows to be False so that the __virtual__ tests
will run
2017-09-07 15:27:11 -06:00
twangboy
6257aa964a
Fix unit.modules.test_pam
for Windows
...
Mocks os.path.exists
2017-09-07 15:18:14 -06:00
twangboy
4a8d7e522c
Fix tests, Use full path to salt.utils.which
2017-09-07 14:41:56 -06:00
Nicole Thomas
6106aec696
Merge pull request #43356 from gtmanfred/2016.11
...
never-download got readded
2017-09-07 13:46:04 -04:00
Nicole Thomas
3f19b247f3
Add handler.messages back in for test comparison
2017-09-07 11:51:39 -04:00
Jochen Breuer
20619b24c4
Fixed test for delete_deployment
...
Due to implementation change, we need to mock the return value.
2017-09-07 10:20:46 +02:00
twangboy
a909813fa5
Remove unused import (lint)
2017-09-06 15:56:24 -06:00
twangboy
3ef8d714cb
Fix unit tests to mock salt.utils.path.readlink
2017-09-06 13:03:14 -06:00
twangboy
7c4460164b
Fix alternatives for Windows
...
Not sure this is necessary... I don't think alternatives is a thing in
Windows. Anyway, it uses `__salt__['file.readlink']` instead of
`os.readlink` as there is no `os.readlink` in Windows.
Modifies the tests to mock `__salt__['file.readlink']` instead of
`os.readlink`
2017-09-06 13:03:14 -06:00
Nicole Thomas
5111cf8bad
Merge branch '2016.11' into 43086-no-member
2017-09-06 10:41:18 -04:00
twangboy
a94319a082
Make sure formatting of TEST_FILE_CONTENT matches original
2017-09-05 17:03:50 -06:00
twangboy
6263bc8983
Remove print statement
2017-09-05 16:48:58 -06:00
twangboy
79cd3831ae
Fix empty value preserved test
2017-09-05 16:44:12 -06:00
twangboy
85997391f1
Is this handled the same on Linux and Windows
2017-09-05 16:32:43 -06:00
Mike Place
6e1b541b46
Merge pull request #43232 from terminalmage/gitfs-inheritance
...
Improve inheritance in salt.utils.gitfs
2017-09-05 14:37:05 -06:00
Daniel Wallace
9911b04208
fix test
2017-09-05 13:52:02 -06:00
twangboy
5bd5ea042a
Fix unit.modules.test_chef
for Windows
...
Mocks the __opts__ to contain cachedir
2017-09-01 14:49:50 -06:00
Nicole Thomas
479e0e06ac
Merge pull request #42975 from brejoc/tests-for-kubernetes-module
...
Added unit tests for Kubernetes module
2017-08-30 16:30:15 -04:00
Nicole Thomas
ca7df1d4cf
Merge pull request #43176 from terminalmage/issue42935
...
docker_image states: Handle Hub images prefixed with "docker.io/"
2017-08-30 16:08:13 -04:00
Nicole Thomas
fdad9177b5
Merge branch '2017.7' into tests-for-kubernetes-module
2017-08-30 14:47:37 -04:00
Nicole Thomas
3777b34572
Merge branch '2017.7' into win_unit_test_local_cache
2017-08-30 12:16:52 -04:00
Nicole Thomas
ec1bedc646
Merge pull request #43254 from twangboy/win_fix_test_inspect_collector
...
Fix `unit.modules.test_inspect_collector` on Windows
2017-08-30 11:46:07 -04:00
Nicole Thomas
25666f88f7
Merge pull request #43251 from twangboy/win_skip_test_groupadd
...
Skips `unit.modules.test_groupadd` on Windows
2017-08-30 09:56:36 -04:00
twangboy
cec627a60b
Skip mac tests for user and group
...
They use grp and pwd
2017-08-29 16:28:12 -06:00
twangboy
b401340e6c
Fix unit.modules.test_inspect_collector
on Windows
...
Uses os.sep instead of unix-style paths in the test
Uses salt.utils.path.islink() to detect symlinks instead of
os.path.islink(). os.path.islink() does not correctly detect symlinks in
Windows
Put grp and pwd imports inside a try/except block
2017-08-29 15:59:08 -06:00
twangboy
5185071d5a
Skips unit.modules.test_groupadd
on Windows
...
There is a test_win_groupadd modules for testing the win_groupadd module
on Windows.
2017-08-29 14:29:50 -06:00
twangboy
c956d24283
Fix is_windows detection when USERNAME missing
2017-08-29 10:16:21 -06:00
twangboy
869e8cc603
Fix unit.fileserver.test_gitfs
for Windows
...
Put `import pwd` in a try/except block
Set `os.environ['USERNAME']` in windows using win_functions
Add error function for `shutil.rmtree`
2017-08-29 10:16:21 -06:00
Jochen Breuer
c227cb25ad
Skipping test on ImportError
...
This most probably means that the Kubernetes client lib is not
installed.
2017-08-29 17:12:25 +02:00
Erik Johnson
53bd3a3e23
Improve inheritance in salt.utils.gitfs
...
This makes the following changes:
1. Renames the valid_providers param in GitBase to git_providers,
allowing for a dictionary mapping provider names to their associated
classes. This allows for alternate providers to be used with a
GitBase subclass.
2. Renames the get_provider function to verify_provider to reduce
confusion with git_providers.
3. Uses super() to run a parent class' dunder init instead of invoking
the parent class directly.
2017-08-28 21:49:42 -05:00
rallytime
3911df2f4b
Merge branch '2016.11' into '2017.7'
...
No conflicts.
2017-08-28 09:25:49 -04:00
Nicole Thomas
df18a89836
Lint: Remove unused import
2017-08-28 09:21:52 -04:00
Jochen Breuer
bd76a870ce
Dunder vars are now defined via setup_loader_modules
2017-08-28 14:17:00 +02:00
Mike Place
ce04ab4286
Merge pull request #42997 from twangboy/win_fix_test_module_names
...
Fix `unit.test_test_module_names` for Windows
2017-08-25 15:19:10 -06:00
Erik Johnson
7279f98e92
docker_image states: Handle Hub images prefixed with "docker.io/"
...
On some platforms, for reason which I do not yet grok, images pulled
from the Hub are prefixed with "docker.io/". This causes the
docker_image states to fail unless the user manually adds "docker.io/"
before the image name.
This commit adds a new function called "docker.resolve_tag" which
disambiguates this variance and allows images to be specified without
the "docker.io/" prefix.
Resolves #42935 .
2017-08-25 00:06:28 -05:00
Nicole Thomas
a6a327b1e5
Merge pull request #43155 from terminalmage/issue43001
...
Resolve image ID during container comparison
2017-08-24 18:09:46 -04:00
garethgreenaway
0186835ebf
Fix docstring in test
2017-08-24 17:08:52 -05:00
garethgreenaway
a0bb654e46
Fixing lint issues
2017-08-24 12:09:29 -07:00
Alessandro -oggei- Ogier
db94f3bb1c
better formatting
2017-08-24 15:07:08 +02:00
Alessandro -oggei- Ogier
e5cc667762
tests: fix a leftover and simplify some parts
2017-08-24 15:04:37 +02:00
Alessandro -oggei- Ogier
13e5997457
lint
2017-08-24 12:49:39 +02:00
Alessandro -oggei- Ogier
216ced69e5
allow comma-separated pkgs lists, quote args, test deb behaviour
2017-08-24 12:00:36 +02:00
twangboy
2722e9521d
Use os.path.join to create paths
2017-08-23 14:43:44 -06:00
Erik Johnson
d5b2a0be68
Resolve image ID during container comparison
...
This fixes an issue where inspecting the container returns an image ID
instead of an image name, resulting in a spurious report of a changed
image. By resolving the image down to its ID for both the existing and
new containers, we ensure we're comparing ID to ID.
2017-08-23 12:23:33 -05:00
Mike Place
03f652159f
Merge pull request #43123 from twangboy/win_fix_test_which
...
Fix `unit.utils.test_which` for Windows
2017-08-23 10:01:38 -06:00
Nicole Thomas
0467a0e3bf
Merge pull request #43038 from twangboy/win_unit_utils_test_url
...
Fix `unit.utils.test_url` for Windows
2017-08-23 09:35:24 -04:00
twangboy
ed97cff5f6
Fix unit.utils.test_which
for Windows
...
This test wasn't really written with Windows in mind. Uses PATHEXT that
actually resembles a Windows environment. The test value has the correct
path seperator for Windows.
2017-08-22 16:59:22 -06:00
Mike Place
1e1a81036c
Merge pull request #42962 from twangboy/win_unit_test_doc
...
Fix `unit.test_doc test` for Windows
2017-08-22 12:06:22 -06:00
Alessandro -oggei- Ogier
42a118ff56
fixed cmd composition and unified his making across module
2017-08-22 16:25:54 +02:00