diff options
author | vamahaja <vamahaja@redhat.com> | 2019-02-08 14:01:53 +0530 |
---|---|---|
committer | vponomar <vponomar@redhat.com> | 2019-02-22 11:22:41 +0000 |
commit | eb396cc001519bfc3d27061a81a7cbf0692e4853 (patch) | |
tree | 1606ea5579a8c1c8da34a980080782bf0f7fd8c5 /tests/functional/common/heketi/test_volume_creation.py | |
parent | d62b88c330a36142f8e0ac18c3713908e3ca26be (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/test_volume_creation.py')
-rw-r--r-- | tests/functional/common/heketi/test_volume_creation.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/functional/common/heketi/test_volume_creation.py b/tests/functional/common/heketi/test_volume_creation.py index 5820b789..86618505 100644 --- a/tests/functional/common/heketi/test_volume_creation.py +++ b/tests/functional/common/heketi/test_volume_creation.py @@ -2,12 +2,12 @@ from glusto.core import Glusto as g from glustolibs.gluster import volume_ops from cnslibs.common import exceptions -from cnslibs.common import heketi_libs +from cnslibs.common.baseclass import BaseClass from cnslibs.common import heketi_ops from cnslibs.common import podcmd -class TestVolumeCreationTestCases(heketi_libs.HeketiBaseClass): +class TestVolumeCreationTestCases(BaseClass): """ Class for volume creation related test cases """ @@ -29,7 +29,9 @@ class TestVolumeCreationTestCases(heketi_libs.HeketiBaseClass): volume_name = output_dict["name"] volume_id = output_dict["id"] - self.addCleanup(self.delete_volumes, volume_id) + self.addCleanup( + heketi_ops.heketi_volume_delete, self.heketi_client_node, + self.heketi_server_url, volume_id) self.assertEqual(output_dict["durability"] ["replicate"]["replica"], 3, @@ -127,7 +129,9 @@ class TestVolumeCreationTestCases(heketi_libs.HeketiBaseClass): # Create first small volume vol = heketi_ops.heketi_volume_create(node, server_url, 1, json=True) - self.addCleanup(self.delete_volumes, vol["id"]) + self.addCleanup( + heketi_ops.heketi_volume_delete, self.heketi_client_node, + self.heketi_server_url, vol["id"]) # Try to create second volume getting "no free space" error try: @@ -137,7 +141,8 @@ class TestVolumeCreationTestCases(heketi_libs.HeketiBaseClass): g.log.info("Volume was not created as expected.") else: self.addCleanup( - self.delete_volumes, vol_fail["bricks"][0]["volume"]) + heketi_ops.heketi_volume_delete, self.heketi_client_node, + self.heketi_server_url, vol_fail["bricks"][0]["volume"]) self.assertFalse( vol_fail, "Volume should have not been created. Out: %s" % vol_fail) |