summaryrefslogtreecommitdiffstats
path: root/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
diff options
context:
space:
mode:
authorvamahaja <vamahaja@redhat.com>2019-02-08 14:01:53 +0530
committervponomar <vponomar@redhat.com>2019-02-22 11:22:41 +0000
commiteb396cc001519bfc3d27061a81a7cbf0692e4853 (patch)
tree1606ea5579a8c1c8da34a980080782bf0f7fd8c5 /tests/functional/common/heketi/heketi_tests/test_disabling_device.py
parentd62b88c330a36142f8e0ac18c3713908e3ca26be (diff)
Merged HeketiBaseClass to BaseClass
Renamed cns_baseclass.py to baseclass.py with updated BaseClass. Merged HeketiBaseClass to BaseClass with appropriate changes. Updated delete_volumes and delete_block_volumes methods used in test case method with heketi_delete_volume and heketi_blockvolume- delete. Change-Id: I8f623f1692cd863dc8ff041f7e8525ee0dc84f7b Signed-off-by: vamahaja <vamahaja@redhat.com>
Diffstat (limited to 'tests/functional/common/heketi/heketi_tests/test_disabling_device.py')
-rw-r--r--tests/functional/common/heketi/heketi_tests/test_disabling_device.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/functional/common/heketi/heketi_tests/test_disabling_device.py b/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
index 6139f64d..f0e2c5c6 100644
--- a/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
+++ b/tests/functional/common/heketi/heketi_tests/test_disabling_device.py
@@ -2,12 +2,12 @@ from glusto.core import Glusto as g
from glustolibs.gluster.volume_ops import get_volume_info
from cnslibs.common import exceptions
-from cnslibs.common import heketi_libs
+from cnslibs.common import baseclass
from cnslibs.common import heketi_ops
from cnslibs.common import podcmd
-class TestDisableHeketiDevice(heketi_libs.HeketiBaseClass):
+class TestDisableHeketiDevice(baseclass.BaseClass):
@podcmd.GlustoPod()
def test_create_volumes_enabling_and_disabling_heketi_devices(self):
"""Validate enable/disable of heketi device"""
@@ -57,7 +57,9 @@ class TestDisableHeketiDevice(heketi_libs.HeketiBaseClass):
self.assertTrue(out, "Failed to create heketi volume of size 1")
g.log.info("Successfully created heketi volume of size 1")
device_id = out["bricks"][0]["device"]
- self.addCleanup(self.delete_volumes, [out["bricks"][0]["volume"]])
+ self.addCleanup(
+ heketi_ops.heketi_volume_delete, self.heketi_client_node,
+ self.heketi_server_url, out["bricks"][0]["volume"])
# Disable device
g.log.info("Disabling '%s' device" % device_id)
@@ -90,7 +92,8 @@ class TestDisableHeketiDevice(heketi_libs.HeketiBaseClass):
g.log.info("Volume was not created as expected.")
else:
self.addCleanup(
- self.delete_volumes, [out["bricks"][0]["volume"]])
+ heketi_ops.heketi_volume_delete, self.heketi_client_node,
+ self.heketi_server_url, out["bricks"][0]["volume"])
msg = "Volume unexpectedly created. Out: %s" % out
assert False, msg
finally:
@@ -116,7 +119,9 @@ class TestDisableHeketiDevice(heketi_libs.HeketiBaseClass):
out = heketi_ops.heketi_volume_create(
self.heketi_client_node, self.heketi_server_url, 1, json=True)
self.assertTrue(out, "Failed to create volume of size 1")
- self.addCleanup(self.delete_volumes, [out["bricks"][0]["volume"]])
+ self.addCleanup(
+ heketi_ops.heketi_volume_delete, self.heketi_client_node,
+ self.heketi_server_url, out["bricks"][0]["volume"])
g.log.info("Successfully created volume of size 1")
name = out["name"]