|
|
@@ -89,20 +89,6 @@ class AzureSnapshotsServiceTestCase(ProviderTestBase):
|
|
|
self.assertTrue(
|
|
|
snapshot is None, "Snapshot should not be available")
|
|
|
|
|
|
- @helpers.skipIfNoService(['block_store.snapshots'])
|
|
|
- def test_azure_snapshot_find(self):
|
|
|
- with self.assertRaises(NotImplementedError):
|
|
|
- snapshots = self.provider.block_store.snapshots.find("Snapshot")
|
|
|
- self.assertTrue(
|
|
|
- len(snapshots) == 2, "Snapshot should not be available")
|
|
|
-
|
|
|
- @helpers.skipIfNoService(['block_store.snapshots'])
|
|
|
- def test_azure_snapshot_find_ifNotExist(self):
|
|
|
- with self.assertRaises(NotImplementedError):
|
|
|
- snapshots = self.provider.block_store.snapshots.find("Snapshot123")
|
|
|
- self.assertTrue(
|
|
|
- len(snapshots) == 0, "Snapshot should not be available")
|
|
|
-
|
|
|
@helpers.skipIfNoService(['block_store.snapshots'])
|
|
|
def test_azure_snapshots_list(self):
|
|
|
snapshot_list = self.provider \
|
|
|
@@ -110,3 +96,16 @@ class AzureSnapshotsServiceTestCase(ProviderTestBase):
|
|
|
print("Snapshot List - " + str(snapshot_list))
|
|
|
self.assertTrue(
|
|
|
snapshot_list.total_results > 0)
|
|
|
+
|
|
|
+ @helpers.skipIfNoService(['block_store.snapshots'])
|
|
|
+ def test_azure_snapshot_find_exists(self):
|
|
|
+ snapshots = self.provider.block_store.snapshots.find("snapshot1")
|
|
|
+ for snapshot in snapshots:
|
|
|
+ self.assertTrue("snapshot" in snapshot.name)
|
|
|
+ print(snapshots.total_results)
|
|
|
+ self.assertTrue(snapshots.total_results > 0)
|
|
|
+
|
|
|
+ @helpers.skipIfNoService(['block_store.snapshots'])
|
|
|
+ def test_azure_snapshot_find_not_exists(self):
|
|
|
+ snapshots = self.provider.block_store.snapshots.find('dontfindme')
|
|
|
+ self.assertTrue(snapshots.total_results == 0)
|