mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #50743 from dwoz/kub_conf
Older MacOS versions won't have TMPDIR environment
This commit is contained in:
commit
730bbde800
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
|
|||
if salt.utils.platform.is_windows():
|
||||
check_path = os.path.join(os.environ.get('TMP'), 'salt-kubeconfig-')
|
||||
elif salt.utils.platform.is_darwin():
|
||||
check_path = os.path.join(os.environ.get('TMPDIR'), 'salt-kubeconfig-')
|
||||
check_path = os.path.join(os.environ.get('TMPDIR', '/tmp'), 'salt-kubeconfig-')
|
||||
self.assertTrue(config['kubeconfig'].lower().startswith(check_path.lower()))
|
||||
self.assertTrue(os.path.exists(config['kubeconfig']))
|
||||
with salt.utils.files.fopen(config['kubeconfig'], 'r') as kcfg:
|
||||
|
|
Loading…
Add table
Reference in a new issue