Commit Graph

5978 Commits

Author SHA1 Message Date
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
rallytime
3911df2f4b Merge branch '2016.11' into '2017.7'
No conflicts.
2017-08-28 09:25:49 -04: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
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
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
twangboy
92dc3c0ece Use os.sep for path 2017-08-16 15:59:10 -06:00
twangboy
201ceae4c4 Fix lint, remove debug statement 2017-08-16 10:29:26 -06:00
twangboy
e9febe4893 Fix unit.test_fileclient
Use os.sep instead of hard-coded, unix-style paths
2017-08-15 16:34:03 -06:00
twangboy
37029c1a16 Fix unit.test_doc test
Use findstr instead of grep on Windows
Use os.linesep for file paths
2017-08-15 15:30:13 -06:00
rallytime
c6b9ca4b9e Lint fix: add missing space 2017-08-15 14:26:44 -04:00
rallytime
5597b1a30e Skip 2 failing tests in Python 3 due to upstream bugs 2017-08-15 14:26:44 -04:00
rallytime
a0b19bdc27 Update account id value in boto_secgroup module unit test
This value was updated in moto 1.0.0 with the following commit:

5f3fbff627
2017-08-15 14:23:00 -04:00
rallytime
60b406e088 @mock_elb needs to be changed to @mock_elb_deprecated as well 2017-08-15 14:23:00 -04:00
rallytime
6ae1111295 Replace @mock_ec2 calls with @mock_ec2_deprecated calls
moto versions >= 1.0.0 have changed the way the mocked connections through
boto are handled with the @mock_ec2 decorator. They use the boto3 connection
method. However, since we are still using boto in many places, we need to use
the new @mock_ec2_deprecated decorator instead to handle the boto connection
functions for the unit tests.

Versions of moto < 1.0.0 are not Python 3 compatible, so salt-jenkins should
be installing newer versions of moto for those tests. Unfortunately, we cannot
install an older version of moto for Python2 that use the original @mock_ec2 call
and also import the @mock_ec2_deprecated function for newer versions of moto
simultaneously as the @mock_ec2_deprecated function doesn't exist in older
versions of moto.
2017-08-15 14:22:59 -04:00
Nicole Thomas
47ff9d5627 Merge pull request #42812 from terminalmage/yaml-loader-tests
Update custom YAML loader tests to properly test unicode literals
2017-08-15 13:50:22 -04:00
Erik Johnson
9d8486a894 Add test for custom YAML loader with unicode literal strings 2017-08-15 11:06:20 -05:00
Erik Johnson
a0118bcece Remove bytestrings and use textwrap.dedent for readability
PyYAML works with and without bytestrings on PY3, and Python 3 can read
all of the test data as regular strings, so bytestrings are unnecessary
here.

This also adds use of textwrap.dedent to make the YAML easier to read,
so it can be indented away from the far left side of the line.
2017-08-15 11:05:48 -05:00
Nicole Thomas
4fcdab3ae9 Merge pull request #42657 from nhavens/2017.7
back-port #42612 to 2017.7
2017-08-14 15:42:25 -04:00
Erik Johnson
1764878754 Merge pull request #42883 from rallytime/fix-boto-tests
Fix failing boto tests
2017-08-11 15:29:11 -05:00
rallytime
6a7bf99848 Lint fix: add missing space 2017-08-11 14:19:15 -04:00
rallytime
43643227c6 Skip 2 failing tests in Python 3 due to upstream bugs 2017-08-11 12:57:39 -04:00
rallytime
7f46603e9c Update account id value in boto_secgroup module unit test
This value was updated in moto 1.0.0 with the following commit:

5f3fbff627
2017-08-10 17:31:14 -04:00
rallytime
7c1d493fdd @mock_elb needs to be changed to @mock_elb_deprecated as well 2017-08-10 17:15:45 -04:00