mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	marvin: Fix intermittent failure observed in test_02_list_snapshots_with_removed_data_store (#5483)
* marvin: Fix intermittent failure observed in test_02_list_snapshots_with_removed_data_store * refactor test
This commit is contained in:
		
							parent
							
								
									50a0e80de6
								
							
						
					
					
						commit
						6ba656b664
					
				@ -245,23 +245,30 @@ class TestSnapshotRootDisk(cloudstackTestCase):
 | 
			
		||||
            PASS,
 | 
			
		||||
            "Invalid response returned for list volumes")
 | 
			
		||||
        vol_uuid = vol_res[0].id
 | 
			
		||||
        
 | 
			
		||||
        # Create new Primary Storage
 | 
			
		||||
        clusters = list_clusters(
 | 
			
		||||
            self.apiclient,
 | 
			
		||||
            zoneid=self.zone.id
 | 
			
		||||
        )
 | 
			
		||||
        assert isinstance(clusters,list) and len(clusters)>0
 | 
			
		||||
 | 
			
		||||
        self.cleanup.append(self.virtual_machine_with_disk)
 | 
			
		||||
 | 
			
		||||
        # Attach created volume to vm, then detach it to be able to migrate it
 | 
			
		||||
        self.virtual_machine_with_disk.stop(self.apiclient)
 | 
			
		||||
        self.virtual_machine_with_disk.attach_volume(
 | 
			
		||||
            self.apiclient,
 | 
			
		||||
            vol
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        # Create new Primary Storage
 | 
			
		||||
        storage = StoragePool.create(self.apiclient,
 | 
			
		||||
                                     self.services["nfs2"],
 | 
			
		||||
                                     clusterid=clusters[0].id,
 | 
			
		||||
                                     zoneid=self.zone.id,
 | 
			
		||||
                                     podid=self.pod.id
 | 
			
		||||
                                     )
 | 
			
		||||
        self.cleanup.append(self.virtual_machine_with_disk)
 | 
			
		||||
        self.cleanup.append(storage)
 | 
			
		||||
 | 
			
		||||
        self.cleanup.append(storage)
 | 
			
		||||
        self.assertEqual(
 | 
			
		||||
            storage.state,
 | 
			
		||||
            'Up',
 | 
			
		||||
@ -296,12 +303,6 @@ class TestSnapshotRootDisk(cloudstackTestCase):
 | 
			
		||||
            "Check storage pool type "
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        # Attach created volume to vm, then detach it to be able to migrate it
 | 
			
		||||
        self.virtual_machine_with_disk.stop(self.apiclient)
 | 
			
		||||
        self.virtual_machine_with_disk.attach_volume(
 | 
			
		||||
            self.apiclient,
 | 
			
		||||
            vol
 | 
			
		||||
        )
 | 
			
		||||
        self.virtual_machine_with_disk.detach_volume(
 | 
			
		||||
            self.apiclient,
 | 
			
		||||
            vol
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user