diff options
author | Valerii Ponomarov <vponomar@redhat.com> | 2019-06-24 01:29:41 +0530 |
---|---|---|
committer | vponomar <vponomar@redhat.com> | 2019-07-11 09:13:40 +0000 |
commit | 32724906d1fd5fd09759e1daf927594461c26d5e (patch) | |
tree | b6744bd1f0b1364e43810c343a873f6022e3e575 /tests/functional/heketi/test_heketi_create_volume.py | |
parent | 1ef65c168d3b45a5af5d263ff3403263810a42d8 (diff) |
Make Heketi commands run on a Heketi POD when main command fails
It happens that heketi client located out of the Heketi POD may fail
not reaching the server side. So, add back-up approach where we run
Heketi commands on a Heketi POD when main commands fail.
Change-Id: Ie6ae5be82082f34426f9288b02575e3abd4940f5
Diffstat (limited to 'tests/functional/heketi/test_heketi_create_volume.py')
-rw-r--r-- | tests/functional/heketi/test_heketi_create_volume.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/functional/heketi/test_heketi_create_volume.py b/tests/functional/heketi/test_heketi_create_volume.py index e9679317..3e242667 100644 --- a/tests/functional/heketi/test_heketi_create_volume.py +++ b/tests/functional/heketi/test_heketi_create_volume.py @@ -3,7 +3,6 @@ from glustolibs.gluster.volume_ops import get_volume_list, get_volume_info import six from openshiftstoragelibs.baseclass import BaseClass -from openshiftstoragelibs.exceptions import ExecutionError from openshiftstoragelibs.heketi_ops import ( heketi_blockvolume_create, heketi_blockvolume_delete, @@ -137,7 +136,7 @@ class TestHeketiVolume(BaseClass): " which contains volumes and/or nodes:" " Expected to fail") self.assertRaises( - ExecutionError, + AssertionError, heketi_cluster_delete, self.heketi_client_node, self.heketi_server_url, cluster_id, ) @@ -192,7 +191,7 @@ class TestHeketiVolume(BaseClass): g.log.info("Trying to delete the node which contains devices in it. " "Expecting failure.") self.assertRaises( - ExecutionError, + AssertionError, heketi_node_delete, self.heketi_client_node, heketi_url, node_id) @@ -245,7 +244,7 @@ class TestHeketiVolume(BaseClass): blockvol2 = heketi_blockvolume_create( self.heketi_client_node, self.heketi_server_url, too_big_vol_size, json=True) - except ExecutionError: + except AssertionError: return if blockvol2 and blockvol2.get('id'): |