mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #45332 from frogunder/fix_mac_archive_tests
fix test_archive tests for mac
This commit is contained in:
commit
e402807cc0
@ -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'
|
||||||
|
Loading…
Reference in New Issue
Block a user