Use QemuBaseTest.socket_dir instead of calling tempfile directly so all tests have consistent directory prefixes.
Suggested-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Peter Xu <[email protected]> Signed-off-by: Fabiano Rosas <[email protected]> --- tests/functional/migration.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/functional/migration.py b/tests/functional/migration.py index 2bfb1f7790..0aa873edba 100644 --- a/tests/functional/migration.py +++ b/tests/functional/migration.py @@ -11,7 +11,6 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. -import tempfile import time from qemu_test import QemuSystemTest, which @@ -65,9 +64,8 @@ def migration_with_tcp_localhost(self): self.do_migrate(dest_uri) def migration_with_unix(self): - with tempfile.TemporaryDirectory(prefix='socket_') as socket_path: - dest_uri = 'unix:%s/qemu-test.sock' % socket_path - self.do_migrate(dest_uri) + dest_uri = 'unix:%s/migration.sock' % self.socket_dir().name + self.do_migrate(dest_uri) def migration_with_exec(self): if not which('ncat'): -- 2.51.0
