mirror of https://github.com/apache/jclouds.git
Update clojure blobstore tests to reflect new argument order.
This commit is contained in:
parent
f17352c70f
commit
a5454fe040
|
@ -24,19 +24,18 @@
|
||||||
(is (blobstore? (as-blobstore (blobstore-context *blobstore*)))))
|
(is (blobstore? (as-blobstore (blobstore-context *blobstore*)))))
|
||||||
|
|
||||||
(deftest create-existing-container-test
|
(deftest create-existing-container-test
|
||||||
(is (not (container-exists? *blobstore* "")))
|
|
||||||
(is (not (container-exists? "")))
|
(is (not (container-exists? "")))
|
||||||
(is (create-container *blobstore* "fred"))
|
(is (create-container "fred"))
|
||||||
(is (container-exists? *blobstore* "fred")))
|
(is (container-exists? "fred")))
|
||||||
|
|
||||||
(deftest create-container-test
|
(deftest create-container-test
|
||||||
(is (create-container *blobstore* "fred"))
|
(is (create-container "fred"))
|
||||||
(is (container-exists? *blobstore* "fred")))
|
(is (container-exists? "fred")))
|
||||||
|
|
||||||
(deftest containers-test
|
(deftest containers-test
|
||||||
(is (empty? (containers *blobstore*)))
|
(is (empty? (containers)))
|
||||||
(is (create-container *blobstore* "fred"))
|
(is (create-container "fred"))
|
||||||
(is (= 1 (count (containers *blobstore*)))))
|
(is (= 1 (count (containers)))))
|
||||||
|
|
||||||
(deftest list-container-test
|
(deftest list-container-test
|
||||||
(is (create-container "container"))
|
(is (create-container "container"))
|
||||||
|
@ -48,7 +47,7 @@
|
||||||
(create-directory "container" "dir")
|
(create-directory "container" "dir")
|
||||||
(is (upload-blob "container" "dir/blob2" "blob2"))
|
(is (upload-blob "container" "dir/blob2" "blob2"))
|
||||||
(is (= 3 (count (list-container "container"))))
|
(is (= 3 (count (list-container "container"))))
|
||||||
(is (= 4 (count (list-container "container" :recursive))))
|
(is (= 4 (count (list-container "container" :recursive true))))
|
||||||
(is (= 1 (count (list-container "container" :in-directory "dir")))))
|
(is (= 1 (count (list-container "container" :in-directory "dir")))))
|
||||||
|
|
||||||
(deftest download-blob-test
|
(deftest download-blob-test
|
||||||
|
@ -103,7 +102,7 @@
|
||||||
(when-not (<= @total 0)
|
(when-not (<= @total 0)
|
||||||
(with-open [baos (java.io.ByteArrayOutputStream.)]
|
(with-open [baos (java.io.ByteArrayOutputStream.)]
|
||||||
(try
|
(try
|
||||||
(download-blob blob-s container-name file baos)
|
(download-blob container-name file baos blob-s)
|
||||||
(catch Exception e
|
(catch Exception e
|
||||||
(with-open [of (java.io.FileOutputStream.
|
(with-open [of (java.io.FileOutputStream.
|
||||||
(java.io.File/createTempFile "jclouds" ".dl"))]
|
(java.io.File/createTempFile "jclouds" ".dl"))]
|
||||||
|
|
Loading…
Reference in New Issue