summaryrefslogtreecommitdiffstats
path: root/tests/functional/common/heketi/test_heketi_device_operations.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-01-02 20:51:13 +0530
committerValerii Ponomarov <vponomar@redhat.com>2019-01-02 20:51:13 +0530
commit874dd8ccabd32bcf2d4cfb4a0be10db7ba1a565d (patch)
tree55a0c6be589a4571c96528a2c56b269b0bfaabf6 /tests/functional/common/heketi/test_heketi_device_operations.py
parentcf2474da1063a24bdd4548b95b8b548e5ef1d03a (diff)
Properly skip TCs when 'additional gluster devices' not configured
For the moment, we have 3 different test cases which use 'additional_devices' config option. All of them will fail in case of specific structure of config. So, make those test cases be smart enough to understand absence of such option data and skip test cases with useful info about it. Change-Id: Id31de7e20188041d2148edf37b3f8c95645c5e52
Diffstat (limited to 'tests/functional/common/heketi/test_heketi_device_operations.py')
-rw-r--r--tests/functional/common/heketi/test_heketi_device_operations.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/functional/common/heketi/test_heketi_device_operations.py b/tests/functional/common/heketi/test_heketi_device_operations.py
index 3fa90bc3..1c4b5457 100644
--- a/tests/functional/common/heketi/test_heketi_device_operations.py
+++ b/tests/functional/common/heketi/test_heketi_device_operations.py
@@ -178,8 +178,12 @@ class TestHeketiDeviceOperations(HeketiBaseClass):
gluster_server_0 = g.config["gluster_servers"].values()[0]
try:
device_name = gluster_server_0["additional_devices"][0]
- except IndexError:
- self.skipTest("Additional disk is not specified for node.")
+ except (KeyError, IndexError):
+ self.skipTest(
+ "Additional disk is not specified for node with following "
+ "hostnames and IP addresses: %s, %s." % (
+ gluster_server_0.get('manage', '?'),
+ gluster_server_0.get('storage', '?')))
manage_hostname = gluster_server_0["manage"]
# Get node ID of the Gluster hostname