diff mbox series

[v5,3/3] Acceptance test: provides to use RDMA transport for migration test

Message ID 20200407155642.10716-4-ovoshcha@redhat.com
State New
Headers show
Series Acceptance test: Extension of migration tests | expand

Commit Message

Oksana Vohchana April 7, 2020, 3:56 p.m. UTC
Adds test for RDMA migration check

Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
---
 tests/acceptance/migration.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Willian Rampazzo April 7, 2020, 5:22 p.m. UTC | #1
On Tue, Apr 7, 2020 at 1:07 PM Oksana Vohchana <ovoshcha@redhat.com> wrote:
>
> Adds test for RDMA migration check
>
> Signed-off-by: Oksana Vohchana <ovoshcha@redhat.com>
> ---
>  tests/acceptance/migration.py | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
> index 1c3a684395..99563ae850 100644
> --- a/tests/acceptance/migration.py
> +++ b/tests/acceptance/migration.py
> @@ -120,3 +120,15 @@ class Migration(Test):
>          """
>          free_port = self._get_free_port()
>          dest_uri = 'exec:nc -l localhost %u' % free_port
> +
> +    @skipUnless(get_rdma_status(), 'RDMA service is disabled or not installed')
> +    @skipUnless(get_interface_rdma(), 'RDMA interface not configured')
> +    def test_migration_with_rdma_localhost(self):
> +        iface = get_interface_rdma()
> +        ip = get_ip_rdma(iface)
> +        if ip:
> +            free_port = self._get_free_port(address=ip[0])
> +        else:
> +            self.cancel("Ip address doesn't configured properly on interface:%s" % iface)
> +        dest_uri = 'rdma:%s:%u' % (ip, free_port)
> +        self.do_migrate(dest_uri)
> --
> 2.21.1
>
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
diff mbox series

Patch

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 1c3a684395..99563ae850 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -120,3 +120,15 @@  class Migration(Test):
         """
         free_port = self._get_free_port()
         dest_uri = 'exec:nc -l localhost %u' % free_port
+
+    @skipUnless(get_rdma_status(), 'RDMA service is disabled or not installed')
+    @skipUnless(get_interface_rdma(), 'RDMA interface not configured')
+    def test_migration_with_rdma_localhost(self):
+        iface = get_interface_rdma()
+        ip = get_ip_rdma(iface)
+        if ip:
+            free_port = self._get_free_port(address=ip[0])
+        else:
+            self.cancel("Ip address doesn't configured properly on interface:%s" % iface)
+        dest_uri = 'rdma:%s:%u' % (ip, free_port)
+        self.do_migrate(dest_uri)