deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rla...@redhat.com
Subject [PATCH 2/4] Tests: buckets_test.rb - adding check to cleanup for whether the collection is supported
Date Wed, 20 Feb 2013 22:04:19 GMT
From: Ronelle Landy <rlandy@redhat.com>

---
 tests/deltacloud/buckets_test.rb |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/tests/deltacloud/buckets_test.rb b/tests/deltacloud/buckets_test.rb
index 3cff7f5..02f517b 100644
--- a/tests/deltacloud/buckets_test.rb
+++ b/tests/deltacloud/buckets_test.rb
@@ -54,13 +54,15 @@ describe 'Deltacloud API buckets collection' do
 
   # delete the bucket/blob we created for the tests
   MiniTest::Unit.after_tests {
-    res = delete("/buckets/#{@@my_bucket}/#{@@my_blob}")
-    unless res.code == 204
-      raise Exception.new("Failed to delete blob #{@@my_blob}")
-    end
-    res = delete("/buckets/#{@@my_bucket}")
-    unless res.code == 204
-      raise Exception.new("Failed to delete bucket #{@@my_bucket}")
+    collection_supported :buckets
+      res = delete("/buckets/#{@@my_bucket}/#{@@my_blob}")
+      unless res.code == 204
+        raise Exception.new("Failed to delete blob #{@@my_blob}")
+      end
+      res = delete("/buckets/#{@@my_bucket}")
+      unless res.code == 204
+        raise Exception.new("Failed to delete bucket #{@@my_bucket}")
+      end
     end
   }
 
-- 
1.7.7.6


Mime
View raw message