Add functional tests for unset multiple volume type props
CinderClient bug/1596511 cause that OSC can't unset multiple properties of volume type, obviously no functional test case cover the part of logic in OSC, that make the issue raising, the patch add functional test cases for this scenario. Change-Id: I42cf9ac8cc72ccc2f1208926d8faf7b80ee2d288 Partial-Bug: #1596511 Depends-On: I60378a32cdc52aacdf869d69b246dec7eb6cdb77
This commit is contained in:
parent
d2273ecea5
commit
8d59b31c72
@ -61,6 +61,21 @@ class VolumeTypeTests(common.BaseVolumeTests):
|
||||
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||
self.assertEqual("c='d'\n", raw_output)
|
||||
|
||||
def test_volume_type_set_unset_multiple_properties(self):
|
||||
raw_output = self.openstack(
|
||||
'volume type set --property a=b --property c=d ' + self.NAME)
|
||||
self.assertEqual("", raw_output)
|
||||
|
||||
opts = self.get_opts(["properties"])
|
||||
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||
self.assertEqual("a='b', c='d'\n", raw_output)
|
||||
|
||||
raw_output = self.openstack(
|
||||
'volume type unset --property a --property c ' + self.NAME)
|
||||
self.assertEqual("", raw_output)
|
||||
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||
self.assertEqual("\n", raw_output)
|
||||
|
||||
def test_multi_delete(self):
|
||||
vol_type1 = uuid.uuid4().hex
|
||||
vol_type2 = uuid.uuid4().hex
|
||||
|
@ -62,6 +62,21 @@ class VolumeTypeTests(common.BaseVolumeTests):
|
||||
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||
self.assertEqual("c='d'\n", raw_output)
|
||||
|
||||
def test_volume_type_set_unset_multiple_properties(self):
|
||||
raw_output = self.openstack(
|
||||
'volume type set --property a=b --property c=d ' + self.NAME)
|
||||
self.assertEqual("", raw_output)
|
||||
|
||||
opts = self.get_opts(["properties"])
|
||||
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||
self.assertEqual("a='b', c='d'\n", raw_output)
|
||||
|
||||
raw_output = self.openstack(
|
||||
'volume type unset --property a --property c ' + self.NAME)
|
||||
self.assertEqual("", raw_output)
|
||||
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||
self.assertEqual("\n", raw_output)
|
||||
|
||||
def test_volume_type_set_unset_project(self):
|
||||
raw_output = self.openstack(
|
||||
'volume type set --project admin ' + self.NAME)
|
||||
|
Loading…
Reference in New Issue
Block a user