mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
test.integration: use hard /tmp on MacOS
Otherwise, the tests will not work as `$TMPDIR` produces a path that is too long for unix sockets on the platform.
This commit is contained in:
parent
23506f8279
commit
8295b48459
2 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ SYS_TMP_DIR = os.path.realpath(
|
|||
# Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
|
||||
# for unix sockets: ``error: AF_UNIX path too long``
|
||||
# Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
|
||||
os.environ.get('TMPDIR', tempfile.gettempdir()) if salt.utils.is_darwin() else '/tmp'
|
||||
os.environ.get('TMPDIR', tempfile.gettempdir()) if not salt.utils.is_darwin() else '/tmp'
|
||||
)
|
||||
TMP = os.path.join(SYS_TMP_DIR, 'salt-tests-tmpdir')
|
||||
FILES = os.path.join(INTEGRATION_TEST_DIR, 'files')
|
||||
|
|
|
@ -20,7 +20,7 @@ SYS_TMP_DIR = os.path.realpath(
|
|||
# Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
|
||||
# for unix sockets: ``error: AF_UNIX path too long``
|
||||
# Gentoo Portage prefers ebuild tests are rooted in ${TMPDIR}
|
||||
os.environ.get('TMPDIR', tempfile.gettempdir()) if salt.utils.is_darwin() else '/tmp'
|
||||
os.environ.get('TMPDIR', tempfile.gettempdir()) if not salt.utils.is_darwin() else '/tmp'
|
||||
)
|
||||
# This tempdir path is defined on tests.integration.__init__
|
||||
TMP = os.path.join(SYS_TMP_DIR, 'salt-tests-tmpdir')
|
||||
|
|
Loading…
Add table
Reference in a new issue