mirror of https://github.com/apache/jclouds.git
fixed CDN bug
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2044 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
ce5e7017eb
commit
94ce40015c
|
@ -164,15 +164,17 @@ public interface CloudFilesClient {
|
||||||
@Endpoint(CloudFilesCDN.class)
|
@Endpoint(CloudFilesCDN.class)
|
||||||
ContainerCDNMetadata getCDNMetadata(@PathParam("container") String container);
|
ContainerCDNMetadata getCDNMetadata(@PathParam("container") String container);
|
||||||
|
|
||||||
@PUT
|
@POST
|
||||||
@Path("{container}")
|
@Path("{container}")
|
||||||
|
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||||
@Endpoint(CloudFilesCDN.class)
|
@Endpoint(CloudFilesCDN.class)
|
||||||
URI enableCDN(@PathParam("container") String container,
|
URI enableCDN(@PathParam("container") String container,
|
||||||
@HeaderParam(CloudFilesHeaders.CDN_TTL) Long ttl);
|
@HeaderParam(CloudFilesHeaders.CDN_TTL) Long ttl);
|
||||||
|
|
||||||
@PUT
|
@POST
|
||||||
@Path("{container}")
|
@Path("{container}")
|
||||||
|
@Headers(keys = CloudFilesHeaders.CDN_ENABLED, values = "True")
|
||||||
@ResponseParser(ParseCdnUriFromHeaders.class)
|
@ResponseParser(ParseCdnUriFromHeaders.class)
|
||||||
@Endpoint(CloudFilesCDN.class)
|
@Endpoint(CloudFilesCDN.class)
|
||||||
URI enableCDN(@PathParam("container") String container);
|
URI enableCDN(@PathParam("container") String container);
|
||||||
|
|
|
@ -100,8 +100,7 @@ public class CloudFilesClientLiveTest extends BaseBlobStoreIntegrationTest<Cloud
|
||||||
// Confirm CDN is enabled via HEAD request and has default TTL
|
// Confirm CDN is enabled via HEAD request and has default TTL
|
||||||
cdnMetadata = context.getApi().getCDNMetadata(containerNameWithCDN);
|
cdnMetadata = context.getApi().getCDNMetadata(containerNameWithCDN);
|
||||||
|
|
||||||
// Ticket #2213 this should be true, but it is false
|
assertTrue(cdnMetadata.isCDNEnabled());
|
||||||
// assertTrue(!cdnMetadata.isCDNEnabled());
|
|
||||||
|
|
||||||
assertEquals(cdnMetadata.getCDNUri(), cdnUri);
|
assertEquals(cdnMetadata.getCDNUri(), cdnUri);
|
||||||
final long initialTTL = cdnMetadata.getTTL();
|
final long initialTTL = cdnMetadata.getTTL();
|
||||||
|
@ -148,8 +147,7 @@ public class CloudFilesClientLiveTest extends BaseBlobStoreIntegrationTest<Cloud
|
||||||
|
|
||||||
cdnMetadata = context.getApi().getCDNMetadata(containerNameWithCDN);
|
cdnMetadata = context.getApi().getCDNMetadata(containerNameWithCDN);
|
||||||
|
|
||||||
// Ticket #2213 this should be true, but it is false
|
assertTrue(cdnMetadata.isCDNEnabled());
|
||||||
// assertTrue(!cdnMetadata.isCDNEnabled());
|
|
||||||
|
|
||||||
assertEquals(cdnMetadata.getTTL(), ttl);
|
assertEquals(cdnMetadata.getTTL(), ttl);
|
||||||
|
|
||||||
|
@ -158,8 +156,7 @@ public class CloudFilesClientLiveTest extends BaseBlobStoreIntegrationTest<Cloud
|
||||||
context.getApi().updateCDN(containerNameWithCDN, minimumTTL);
|
context.getApi().updateCDN(containerNameWithCDN, minimumTTL);
|
||||||
|
|
||||||
cdnMetadata = context.getApi().getCDNMetadata(containerNameWithCDN);
|
cdnMetadata = context.getApi().getCDNMetadata(containerNameWithCDN);
|
||||||
// Ticket #2213 this should be true, but it is false
|
assertTrue(cdnMetadata.isCDNEnabled());
|
||||||
// assertTrue(!cdnMetadata.isCDNEnabled());
|
|
||||||
|
|
||||||
assertEquals(cdnMetadata.getTTL(), minimumTTL);
|
assertEquals(cdnMetadata.getTTL(), minimumTTL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue