diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java index 9f8383b43b..f9758a2fa3 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseContainerIntegrationTest.java @@ -47,6 +47,8 @@ import org.jclouds.blobstore.domain.ContainerAccess; import org.jclouds.blobstore.domain.PageSet; import org.jclouds.blobstore.domain.StorageMetadata; import org.jclouds.blobstore.options.ListContainerOptions; +import org.jclouds.http.HttpRequest; +import org.jclouds.http.HttpResponse; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -511,6 +513,15 @@ public class BaseContainerIntegrationTest extends BaseBlobStoreIntegrationTest { blobStore.setContainerAccess(containerName, ContainerAccess.PUBLIC_READ); assertThat(blobStore.getContainerAccess(containerName)).isEqualTo(ContainerAccess.PUBLIC_READ); + String blobName = "blob"; + blobStore.putBlob(containerName, blobStore.blobBuilder(blobName).payload("").build()); + + // test that blob is anonymously readable + HttpRequest request = view.getSigner().signGetBlob(containerName, blobName).toBuilder() + .replaceQueryParams(ImmutableMap.of()).build(); + HttpResponse response = view.utils().http().invoke(request); + assertThat(response.getStatusCode()).isEqualTo(200); + blobStore.setContainerAccess(containerName, ContainerAccess.PRIVATE); assertThat(blobStore.getContainerAccess(containerName)).isEqualTo(ContainerAccess.PRIVATE); } finally {