فهرست منبع

Integration for Delete image and find snapshot

jatin 9 سال پیش
والد
کامیت
0eb6528ac3

+ 4 - 3
azure_integration_test/test_integration_azure_image_service.py

@@ -14,6 +14,7 @@ class AzureIntegrationImageServiceTestCase(ProviderTestBase):
             print("Get Image - " + str(image_get))
             self.assertIsNotNone(image_get)
 
-        # print("Before updating tag - " + str(image_get.name))
-        # image_get.name("NewTestImage")
-        # print("After updating tag - " + str(image_get.name))
+        image_get.delete()
+        image_get_afetr_delete = self.provider.compute.images.get(image_get.id)
+        print("Get Image - " + str(image_get_afetr_delete))
+        self.assertIsNone(image_get_afetr_delete)

+ 5 - 6
azure_integration_test/test_integration_azure_snapshot_service.py

@@ -39,12 +39,11 @@ class AzureIntegrationSnapshotServiceTestCase(helpers.ProviderTestBase):
             snapshot.name == snapshot_name,
             "Snapshot name should be MySnapshot")
 
-        with self.assertRaises(NotImplementedError):
-            snapshot_find = self.provider.block_store.\
-                snapshots.find(snapshot_name)
-            print("Find Snapshot  - " + str(snapshot))
-            self.assertEqual(
-                len(snapshot_find), 1)
+        snapshot_find = self.provider.block_store. \
+            snapshots.find(snapshot_name)
+        print("Find Snapshot  - " + str(snapshot))
+        self.assertEqual(
+            len(snapshot_find), 1)
 
         volume = snapshot.create_volume()
         volume.wait_till_ready()