diff options
| author | Robert Francis <robefran@ca.ibm.com> | 2015-07-30 15:11:33 -0400 |
|---|---|---|
| committer | Robert Francis <robefran@ca.ibm.com> | 2015-08-05 07:25:06 -0400 |
| commit | 4850728b990536ad49775e67c849536d6320e111 (patch) | |
| tree | 853f8041b4bb43c6b3846bd4c81b452602ca0eb6 /functional/tests | |
| parent | 1f341b4a33572a749f8f190269c9b2c130a0f3d1 (diff) | |
| download | python-openstackclient-4850728b990536ad49775e67c849536d6320e111.tar.gz | |
Add functional test for volume type create --property
Combine test_volume_set_one_propety and
test_volume_type_set_unset_properties.
Change-Id: Ia8862a59161f6a15880b87ea305fb5bb15c31300
Diffstat (limited to 'functional/tests')
| -rw-r--r-- | functional/tests/volume/v1/test_volume_type.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/functional/tests/volume/v1/test_volume_type.py b/functional/tests/volume/v1/test_volume_type.py index afdf1002..dc8b1f45 100644 --- a/functional/tests/volume/v1/test_volume_type.py +++ b/functional/tests/volume/v1/test_volume_type.py @@ -44,13 +44,17 @@ class VolumeTypeTests(common.BaseVolumeTests): raw_output = self.openstack('volume type show ' + self.NAME + opts) self.assertEqual(self.NAME + "\n", raw_output) - def test_volume_set_one_property(self): - props = "foo='bar'" + def test_volume_type_set_unset_properties(self): + 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 + - ' --property ' + props) - self.assertEqual('', raw_output) + opts = self.get_show_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 show -f value -c properties ' + raw_output = self.openstack('volume type unset --property a ' + 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) |
