> @@ -112,6 +117,32 @@ public void
> testPublicAccessInNonDefaultLocationWithBigBlob() throws Interrupted
> runCreateContainerInLocation(payload, nonDefault);
> }
>
> + @Test(groups = "live", dependsOnMethods = "testPublicAccess")
> + public void testContainerListWithPrefix() throws InterruptedException {
> + final String containerName = getContainerName();
> + BlobStore blobStore = view.getBlobStore();
> + String prefix = "blob";
> + try {
> + blobStore.putBlob(containerName,
> blobStore.blobBuilder(prefix).payload("").build());
> + blobStore.putBlob(containerName, blobStore.blobBuilder(prefix +
> "foo").payload("").build());
> + blobStore.putBlob(containerName, blobStore.blobBuilder(prefix +
> "bar").payload("").build());
> + blobStore.putBlob(containerName,
> blobStore.blobBuilder("foo").payload("").build());
> + checkEqualNames(ImmutableSet.of(prefix, prefix + "foo", prefix +
> "bar"),
Would this be more obvious with a function which extracted the blob names and
an assertThat call:
```java
assertThat(extractBlobNames(blobStore.list(...)).hasSameElementsAs(ImmutableSet.of(...));
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/788/files#r33404915