@@ -104,7 +104,7 @@ def test_volume_list(self):
104104 # TODO(qiangjiahui): Add project option to filter tests when we can
105105 # specify volume with project
106106
107- def test_volume_set (self ):
107+ def test_volume_set_and_unset (self ):
108108 """Tests create volume, set, unset, show, delete"""
109109 name = uuid .uuid4 ().hex
110110 new_name = name + "_"
@@ -144,8 +144,11 @@ def test_volume_set(self):
144144 '--name ' + new_name +
145145 ' --size 2 ' +
146146 '--description bbbb ' +
147- '--property Alpha=c ' +
147+ '--no- property ' +
148148 '--property Beta=b ' +
149+ '--property Gamma=c ' +
150+ '--image-property a=b ' +
151+ '--image-property c=d ' +
149152 '--bootable ' +
150153 name ,
151154 )
@@ -168,9 +171,13 @@ def test_volume_set(self):
168171 cmd_output ["description" ],
169172 )
170173 self .assertEqual (
171- "Alpha='c ', Beta='b '" ,
174+ "Beta='b ', Gamma='c '" ,
172175 cmd_output ["properties" ],
173176 )
177+ self .assertEqual (
178+ {'a' : 'b' , 'c' : 'd' },
179+ cmd_output ["volume_image_metadata" ],
180+ )
174181 self .assertEqual (
175182 'true' ,
176183 cmd_output ["bootable" ],
@@ -179,7 +186,8 @@ def test_volume_set(self):
179186 # Test volume unset
180187 raw_output = self .openstack (
181188 'volume unset ' +
182- '--property Alpha ' +
189+ '--property Beta ' +
190+ '--image-property a ' +
183191 new_name ,
184192 )
185193 self .assertOutput ('' , raw_output )
@@ -189,9 +197,13 @@ def test_volume_set(self):
189197 new_name
190198 ))
191199 self .assertEqual (
192- "Beta='b '" ,
200+ "Gamma='c '" ,
193201 cmd_output ["properties" ],
194202 )
203+ self .assertEqual (
204+ {'c' : 'd' },
205+ cmd_output ["volume_image_metadata" ],
206+ )
195207
196208 def test_volume_snapshot (self ):
197209 """Tests volume create from snapshot"""
0 commit comments