From 4850728b990536ad49775e67c849536d6320e111 Mon Sep 17 00:00:00 2001 From: Robert Francis Date: Thu, 30 Jul 2015 15:11:33 -0400 Subject: [PATCH] Add functional test for volume type create --property Combine test_volume_set_one_propety and test_volume_type_set_unset_properties. Change-Id: Ia8862a59161f6a15880b87ea305fb5bb15c31300 --- functional/tests/volume/v1/test_volume_type.py | 18 +++++++++++------- 1 file 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 afdf10025f..dc8b1f4580 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)