You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2013/02/22 17:15:26 UTC

[2/4] git commit: Tests: buckets_test.rb - adding check to cleanup for whether the collection is supported

Tests: buckets_test.rb - adding check to cleanup for whether the collection is supported

TrackedAt: http://tracker.deltacloud.org/patch/727f1e3ce313b594d8b85a2e5db9728b6a5dc6f3


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/05ab34ab
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/05ab34ab
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/05ab34ab

Branch: refs/heads/master
Commit: 05ab34ab3d7d25b45fbbfb27cebd697baf6b6551
Parents: 10683b4
Author: Ronelle Landy <rl...@redhat.com>
Authored: Fri Feb 15 11:38:33 2013 -0500
Committer: marios <ma...@redhat.com>
Committed: Fri Feb 22 18:06:27 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/05ab34ab/tests/deltacloud/buckets_test.rb
----------------------------------------------------------------------
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
   }