Do not fail AWS S3 signer tests with expiry

Regression from 41bdd9c5a9.
References #1008.
This commit is contained in:
Andrew Gaul 2016-09-17 12:12:54 -07:00
parent 4bbca9edf9
commit 76995a363d
2 changed files with 23 additions and 4 deletions

View File

@ -33,11 +33,17 @@ public class S3BlobSignerLiveTest extends BaseBlobSignerLiveTest {
BaseBlobStoreIntegrationTest.SANITY_CHECK_RETURNED_BUCKET_NAME = true;
}
protected boolean supportsUrlWithTime() {
return false;
}
@Test
public void testSignGetUrlWithTime() throws InterruptedException, IOException {
try {
super.testSignGetUrlWithTime();
fail();
if (!supportsUrlWithTime()) {
fail();
}
} catch (UnsupportedOperationException uoe) {
throw new SkipException("not supported by S3 signer", uoe);
}
@ -47,7 +53,9 @@ public class S3BlobSignerLiveTest extends BaseBlobSignerLiveTest {
public void testSignGetUrlWithTimeExpired() throws InterruptedException, IOException {
try {
super.testSignGetUrlWithTimeExpired();
fail();
if (!supportsUrlWithTime()) {
fail();
}
} catch (UnsupportedOperationException uoe) {
throw new SkipException("not supported by S3 signer", uoe);
}
@ -57,7 +65,9 @@ public class S3BlobSignerLiveTest extends BaseBlobSignerLiveTest {
public void testSignPutUrlWithTime() throws Exception {
try {
super.testSignPutUrlWithTime();
fail();
if (!supportsUrlWithTime()) {
fail();
}
} catch (UnsupportedOperationException uoe) {
throw new SkipException("not supported by S3 signer", uoe);
}
@ -67,7 +77,9 @@ public class S3BlobSignerLiveTest extends BaseBlobSignerLiveTest {
public void testSignPutUrlWithTimeExpired() throws Exception {
try {
super.testSignPutUrlWithTimeExpired();
fail();
if (!supportsUrlWithTime()) {
fail();
}
} catch (UnsupportedOperationException uoe) {
throw new SkipException("not supported by S3 signer", uoe);
}

View File

@ -16,9 +16,11 @@
*/
package org.jclouds.aws.s3.blobstore.integration;
import java.io.IOException;
import java.util.Properties;
import org.jclouds.Constants;
import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest;
import org.jclouds.s3.blobstore.integration.S3BlobSignerLiveTest;
import org.testng.annotations.Test;
@ -35,4 +37,9 @@ public class AWSS3BlobSignerLiveTest extends S3BlobSignerLiveTest {
overrides.setProperty(Constants.PROPERTY_SESSION_INTERVAL, "1");
return overrides;
}
@Override
protected boolean supportsUrlWithTime() {
return true;
}
}