diff options
author | Sri Vignesh <sselvan@redhat.com> | 2019-09-05 20:12:21 +0530 |
---|---|---|
committer | vponomar <vponomar@redhat.com> | 2019-09-06 12:51:22 +0000 |
commit | c99b48b2e11b4a4d84f5f5ca3ecefcb2d5e118f5 (patch) | |
tree | 6ba950c18dca595a0af126f38fd5a368a76c28f6 /tests/functional/heketi/test_block_volumes_heketi.py | |
parent | 201f4c8c1a7877e10e46545dd5db02440803b1d3 (diff) |
Add testcase to creation of block volume with name
Validate creation of block volume with name
Change-Id: I08ee31201d42a95f8a829eb54ce68421903fdbbf
Signed-off-by: Sri Vignesh <sselvan@redhat.com>
Diffstat (limited to 'tests/functional/heketi/test_block_volumes_heketi.py')
-rw-r--r-- | tests/functional/heketi/test_block_volumes_heketi.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/heketi/test_block_volumes_heketi.py b/tests/functional/heketi/test_block_volumes_heketi.py index 424769d7..5520e8bc 100644 --- a/tests/functional/heketi/test_block_volumes_heketi.py +++ b/tests/functional/heketi/test_block_volumes_heketi.py @@ -16,6 +16,7 @@ from openshiftstoragelibs.openshift_ops import ( get_default_block_hosting_volume_size ) from openshiftstoragelibs import podcmd +from openshiftstoragelibs import utils @ddt.ddt @@ -223,3 +224,22 @@ class TestBlockVolumeOps(BaseClass): block_vol_info["blockvolume"]["password"], "", ("Password is %spresent in %s", (assertion_msg_part, block_vol["id"]))) + + def test_block_volume_create_with_name(self): + """Validate creation of block volume with name""" + vol_name = "autotests-heketi-volume-%s" % utils.get_random_str() + block_vol = heketi_blockvolume_create( + self.heketi_client_node, self.heketi_server_url, 1, + name=vol_name, json=True) + self.addCleanup( + heketi_blockvolume_delete, self.heketi_client_node, + self.heketi_server_url, block_vol["id"]) + + # check volume name through heketi-cli + block_vol_info = heketi_blockvolume_info( + self.heketi_client_node, self.heketi_server_url, + block_vol["id"], json=True) + self.assertEqual( + block_vol_info["name"], vol_name, + ("Block volume Names are not same %s as %s", + (block_vol_info["name"], vol_name))) |