mirror of https://github.com/apache/jclouds.git
Add another arity to list-blobs so that it can be called without the blobstore argument. Also add some basic tests for list-blobs-test.
This commit is contained in:
parent
53c735fdff
commit
57f0dcaf15
|
@ -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."
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue