예제 #1
0
        public void test_delete_container()
        {
            _headers.Add("request-type", "container");
            ContainerResponse res = _client.DeleteContainer("", "", "", _headers, new Dictionary <string, string>());

            Assert.True(res.Reason == "foo");
            Assert.True(res.Status == 201);
        }
예제 #2
0
 public void teardown()
 {
     teardown_query["prefix"] = prefix;
     try
     {
         foreach (var container_info in client.GetAccount(storage_url, auth_token, new Dictionary <string, string>(), teardown_query, false).Containers)
         {
             foreach (var object_info in client.GetContainer(storage_url, auth_token, container_info["name"], new Dictionary <string, string>(), new Dictionary <string, string>(), false).Objects)
             {
                 client.DeleteObject(storage_url, auth_token, container_info["name"],
                                     container_info.ContainsKey("name") ? object_info["name"] : object_info["subdir"],
                                     new Dictionary <string, string>(), new Dictionary <string, string>());
             }
             client.DeleteContainer(storage_url, auth_token, container_info["name"], new Dictionary <string, string>(), new Dictionary <string, string>());
         }
     }
     catch (ClientException)
     {
     }
 }