Merge pull request #45641 from rallytime/bp-45508

Back-port #45508 to 2017.7.3
This commit is contained in:
Nicole Thomas 2018-01-23 16:18:38 -05:00 committed by GitHub
commit e659793c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,12 +35,14 @@ def _isfile_side_effect(path):
return {
'/tmp/foo.tar.gz': True,
'c:\\tmp\\foo.tar.gz': True,
'/private/tmp/foo.tar.gz': True,
'/tmp/out': False,
'\\tmp\\out': False,
'/usr/bin/tar': True,
'/bin/tar': True,
'/tmp/test_extracted_tar': False,
'c:\\tmp\\test_extracted_tar': False,
'/private/tmp/test_extracted_tar': False,
}[path]
@ -66,6 +68,9 @@ class ArchiveTestCase(TestCase, LoaderModuleMockMixin):
if salt.utils.is_windows():
source = 'c:\\tmp\\foo.tar.gz'
tmp_dir = 'c:\\tmp\\test_extracted_tar'
elif salt.utils.is_darwin():
source = '/private/tmp/foo.tar.gz'
tmp_dir = '/private/tmp/test_extracted_tar'
else:
source = '/tmp/foo.tar.gz'
tmp_dir = '/tmp/test_extracted_tar'