Commit Graph

5997 Commits

Author SHA1 Message Date
twangboy
6ceb895a84 Use os.path.join for paths 2017-09-07 16:51:10 -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
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
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
Tarjei Husøy
1a987cb948 Fix broken negation in iptables
Introduced in 7c6ff77c and released with 2017.7.
2017-08-22 09:43:20 -04:00
Mike Place
f9b4976c02 Merge pull request #42996 from twangboy/win_fix_test_stateconf
Fix `unit.test_stateconf` for Windows
2017-08-21 16:43:58 -06:00
Mike Place
19fc644c9b Merge pull request #43024 from twangboy/win_unit_utils_test_find
Fix `unit.utils.test_find` for Windows
2017-08-21 16:38:09 -06:00
Mike Place
1a531169fc Merge pull request #43088 from gtmanfred/2017.7
allow docker util to be reloaded with reload_modules
2017-08-21 16:14:36 -06:00
Mike Place
5482524270 Merge pull request #41994 from twangboy/win_unit_test_cmdmod
Fix `unit.modules.test_cmdmod` on Windows
2017-08-21 15:53:01 -06:00
Daniel Wallace
373a9a0be4 allow docker util to be reloaded with reload_modules
If we reference the actual import, the utils module won't be reloaded, but if
we use `__utils__` it can be reloaded on a pip install
2017-08-21 13:18:08 -06:00
garethgreenaway
882fcd846f Merge pull request #43029 from terminalmage/fix-func-alias
Normalize the salt caching API
2017-08-21 09:54:58 -07:00
Jochen Breuer
3c99e61637
Renamed test to match new convention 2017-08-18 15:19:34 +02:00
Jochen Breuer
caf78d206d
Fixed imports for pytest
Imports now match the new test-suite introduced in 2017.7.
2017-08-18 15:15:20 +02:00
rallytime
84829a6f8c Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/modules/jenkins.py
  - salt/states/jenkins.py
2017-08-18 09:13:54 -04:00
Erik Johnson
f8f74a310c Update localfs cache tests to reflect changes to func naming 2017-08-17 17:19:34 -05:00
twangboy
fbe54c9a33 Remove unused import six (lint) 2017-08-17 15:54:38 -06:00
twangboy
7f5ee55f57 Fix unit.utils.test_url for Windows
Detect escaped urls in Windows
Unescape urls in Windows
Fix tests to deal with sanitized Windows paths
2017-08-17 14:20:25 -06:00
twangboy
b04d1a2f18 Fix unit.utils.test_find for Windows
Fix skipIf statements
Use sys.maxsize instead of sys.maxint
2017-08-17 11:55:00 -06:00
Erik Johnson
4089b7b1bc Use socket.AF_INET6 to get the correct value instead of doing an OS check
This builds on #43014 with a more future-proof solution.
2017-08-17 12:12:27 -05:00
Ch3LL
b8eee4401e Change AF_INET6 family for mac in test_host_to_ips 2017-08-17 10:55:53 -04:00
rallytime
8a0f948e4a Merge branch '2016.11' into '2017.7'
Conflicts:
  - salt/utils/versions.py
  - tests/unit/modules/test_boto_elb.py
  - tests/unit/modules/test_boto_secgroup.py
  - tests/unit/states/test_boto_vpc.py
2017-08-17 09:10:31 -04:00