fix test_archive tests for mac

This commit is contained in:
Frode Gundersen 2018-01-08 20:18:52 +00:00
parent 29788617f1
commit 9edca8a6cf
No known key found for this signature in database
GPG Key ID: 49E5BDBFA6AFB570

View File

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