Explorar el Código

Tests for list Object store added
Earlier commit was "Added integration test for SG" instead of
"Tests for SG Create and SG rules create and delete added"

jatin hace 9 años
padre
commit
c870073d63

+ 3 - 0
cloudbridge/cloud/providers/azure/mock_azure_client.py

@@ -97,6 +97,9 @@ class MockAzureClient:
                 return container
         return None
 
+    def list_containers(self):
+        return self.containers
+
     def create_container(self, container_name):
         new_container = Container()
         new_container.name = container_name

+ 7 - 0
test/test_azure_object_store_service.py

@@ -22,6 +22,13 @@ class AzureObjectStoreServiceTestCase(ProviderTestBase):
             container.name == container_name,
             "Name of the container should be {0}".format(container_name))
 
+    @helpers.skipIfNoService(['object_store'])
+    def test_azure_bucket_list(self):
+        containerList = self.provider.object_store.list()
+        print("List Container - " + str(containerList))
+        self.assertEqual(
+            len(containerList), 1)
+
     @helpers.skipIfNoService(['object_store'])
     def test_azure_bucket_find_Exist(self):
         container = self.provider.object_store.find("container1")