Add functional test for volume type create --property
Combine test_volume_set_one_propety and test_volume_type_set_unset_properties. Change-Id: Ia8862a59161f6a15880b87ea305fb5bb15c31300
This commit is contained in:
parent
1f341b4a33
commit
4850728b99
@ -44,13 +44,17 @@ class VolumeTypeTests(common.BaseVolumeTests):
|
|||||||
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||||
self.assertEqual(self.NAME + "\n", raw_output)
|
self.assertEqual(self.NAME + "\n", raw_output)
|
||||||
|
|
||||||
def test_volume_set_one_property(self):
|
def test_volume_type_set_unset_properties(self):
|
||||||
props = "foo='bar'"
|
raw_output = self.openstack(
|
||||||
|
'volume type set --property a=b --property c=d ' + self.NAME)
|
||||||
|
self.assertEqual("", raw_output)
|
||||||
|
|
||||||
raw_output = self.openstack('volume type set ' + self.NAME +
|
opts = self.get_show_opts(["properties"])
|
||||||
' --property ' + props)
|
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||||
self.assertEqual('', raw_output)
|
self.assertEqual("a='b', c='d'\n", raw_output)
|
||||||
|
|
||||||
raw_output = self.openstack('volume type show -f value -c properties '
|
raw_output = self.openstack('volume type unset --property a '
|
||||||
+ self.NAME)
|
+ self.NAME)
|
||||||
self.assertEqual(props + '\n', raw_output)
|
self.assertEqual("", raw_output)
|
||||||
|
raw_output = self.openstack('volume type show ' + self.NAME + opts)
|
||||||
|
self.assertEqual("c='d'\n", raw_output)
|
||||||
|
Loading…
Reference in New Issue
Block a user