diff --git a/blobstore/src/main/clojure/org/jclouds/blobstore.clj b/blobstore/src/main/clojure/org/jclouds/blobstore.clj index 91bc83f417..e65c9ad32e 100644 --- a/blobstore/src/main/clojure/org/jclouds/blobstore.clj +++ b/blobstore/src/main/clojure/org/jclouds/blobstore.clj @@ -169,10 +169,12 @@ Note: (apply concat coll) or (lazy-cat coll) are not lazy wrt coll itself." (defn list-blobs "Returns a lazy seq of all blobs in the given container." - ([container prefix #^BlobStore blobstore] - (concat-elements (list-blobs-chunks container prefix blobstore :start))) - ([container #^BlobStore blobstore] - (list-blobs container nil blobstore))) + ([container] + (list-blobs container *blobstore*)) + ([container blobstore] + (list-blobs container nil blobstore)) + ([container prefix blobstore] + (concat-elements (list-blobs-chunks container prefix blobstore :start)))) (defn locations "Retrieve the available container locations for the blobstore context." diff --git a/blobstore/src/test/clojure/org/jclouds/blobstore_test.clj b/blobstore/src/test/clojure/org/jclouds/blobstore_test.clj index 1a347a7d1c..360f4ad5d2 100644 --- a/blobstore/src/test/clojure/org/jclouds/blobstore_test.clj +++ b/blobstore/src/test/clojure/org/jclouds/blobstore_test.clj @@ -77,6 +77,11 @@ (is (= 3 (count (list-container "container" :with-details true)))) (is (= 1 (count (list-container "container" :in-directory "dir"))))) +(deftest list-blobs-test + (is (create-container "container")) + (is (empty? (list-blobs "container"))) + (is (empty? (list-blobs "container" "/a" *blobstore*)))) + (deftest get-blob-test (is (create-container "blob")) (is (upload-blob "blob" "blob1" "blob1"))