tests/acceptance/migration: Test UNIX transport when migrating
authorOksana Vohchana <ovoshcha@redhat.com>
Mon, 3 Feb 2020 11:16:31 +0000 (13:16 +0200)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 7 Feb 2020 14:12:48 +0000 (15:12 +0100)
Along with VM migration via TCP, we can use migration through
the UNIX transport protocol

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203111631.18796-3-ovoshcha@redhat.com>
[PMD: Split patch in 2, reworded subject and description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
tests/acceptance/migration.py

index 03686d7de3ecf7bf45ea5316d749f89dafec873e..9eebc36b8f96dac2280477f3933b083298534ae7 100644 (file)
@@ -10,6 +10,7 @@
 # later.  See the COPYING file in the top-level directory.
 
 
+import tempfile
 from avocado_qemu import Test
 
 from avocado.utils import network
@@ -54,3 +55,8 @@ class Migration(Test):
     def test_migration_with_tcp_localhost(self):
         dest_uri = 'tcp:localhost:%u' % self._get_free_port()
         self.do_migrate(dest_uri)
+
+    def test_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)