mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Use tempfile.gettempdir()
since that depends on current user and distro setup
This commit is contained in:
parent
33d8832e40
commit
9503045b05
@ -7,6 +7,7 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
import os.path
|
import os.path
|
||||||
import glob
|
import glob
|
||||||
|
import tempfile
|
||||||
|
|
||||||
# Import Salt Testing Libs
|
# Import Salt Testing Libs
|
||||||
from salttesting import TestCase, skipIf
|
from salttesting import TestCase, skipIf
|
||||||
@ -89,7 +90,7 @@ class QemuNbdTestCase(TestCase):
|
|||||||
'mount.mount': mock,
|
'mount.mount': mock,
|
||||||
'cmd.retcode': MagicMock(side_effect=[1, 0])}):
|
'cmd.retcode': MagicMock(side_effect=[1, 0])}):
|
||||||
self.assertDictEqual(qemu_nbd.init('/srv/image.qcow2'),
|
self.assertDictEqual(qemu_nbd.init('/srv/image.qcow2'),
|
||||||
{'/tmp/nbd/nbd0/nbd0': '/dev/nbd0'})
|
{'{0}/nbd/nbd0/nbd0'.format(tempfile.gettempdir()): '/dev/nbd0'})
|
||||||
|
|
||||||
# 'clear' function tests: 1
|
# 'clear' function tests: 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user