File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -148,9 +148,13 @@ def test_03_restore_vm_with_disk_offering_custom_size(self):
148148 self .assertEqual (root_vol .state , 'Ready' , "Volume should be in Ready state" )
149149 self .assertEqual (root_vol .size , 16 * 1024 * 1024 * 1024 , "Size of volume and custom disk size should match" )
150150
151- old_root_vol = Volume .list (self .apiclient , id = old_root_vol .id )[0 ]
152- self .assertEqual (old_root_vol .state , "Destroy" , "Old volume should be in Destroy state" )
153- Volume .delete (old_root_vol , self .apiclient )
151+ if self .hypervisor .lower () == "vmware" :
152+ old_root_vol = Volume .list (self .apiclient , id = old_root_vol .id )
153+ self .assertEqual (old_root_vol , None , "Old volume should be deleted" )
154+ else :
155+ old_root_vol = Volume .list (self .apiclient , id = old_root_vol .id )[0 ]
156+ self .assertEqual (old_root_vol .state , "Destroy" , "Old volume should be in Destroy state" )
157+ Volume .delete (old_root_vol , self .apiclient )
154158
155159 @attr (tags = ["advanced" , "basic" ], required_hardware = "false" )
156160 def test_04_restore_vm_allocated_root (self ):
You can’t perform that action at this time.
0 commit comments