Repository: jclouds Updated Branches: refs/heads/master 0af3380a6 -> a4c40e15c
Handle unimplemented signed URL tests in providers This commit makes it evident in source code which providers do not support this feature. Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/a4c40e15 Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/a4c40e15 Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/a4c40e15 Branch: refs/heads/master Commit: a4c40e15cdddda30a9683d12bf022d94025567c8 Parents: 0af3380 Author: Andrew Gaul <[email protected]> Authored: Fri May 6 10:10:57 2016 -0700 Committer: Andrew Gaul <[email protected]> Committed: Fri May 6 10:31:37 2016 -0700 ---------------------------------------------------------------------- .../integration/AtmosBlobSignerLiveTest.java | 39 ++++++++++++++++++++ .../internal/BaseBlobSignerLiveTest.java | 9 ----- .../integration/AzureBlobSignerLiveTest.java | 39 ++++++++++++++++++++ 3 files changed, 78 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/a4c40e15/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java ---------------------------------------------------------------------- diff --git a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java index 8809be4..fe050f3 100644 --- a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/integration/AtmosBlobSignerLiveTest.java @@ -16,7 +16,10 @@ */ package org.jclouds.atmos.blobstore.integration; +import java.io.IOException; + import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest; +import org.testng.SkipException; import org.testng.annotations.Test; @Test(groups = { "live" }) @@ -24,4 +27,40 @@ public class AtmosBlobSignerLiveTest extends BaseBlobSignerLiveTest { public AtmosBlobSignerLiveTest() { provider = "atmos"; } + + @Test + public void testSignGetUrlWithTime() throws InterruptedException, IOException { + try { + super.testSignGetUrlWithTime(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Atmos", uoe); + } + } + + @Test + public void testSignGetUrlWithTimeExpired() throws InterruptedException, IOException { + try { + super.testSignGetUrlWithTimeExpired(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Atmos", uoe); + } + } + + @Test + public void testSignPutUrlWithTime() throws Exception { + try { + super.testSignPutUrlWithTime(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Atmos", uoe); + } + } + + @Test + public void testSignPutUrlWithTimeExpired() throws Exception { + try { + super.testSignPutUrlWithTimeExpired(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Atmos", uoe); + } + } } http://git-wip-us.apache.org/repos/asf/jclouds/blob/a4c40e15/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java ---------------------------------------------------------------------- diff --git a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java index 080ed9e..8d5f5ea 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobSignerLiveTest.java @@ -29,7 +29,6 @@ import org.jclouds.blobstore.domain.Blob; import org.jclouds.http.HttpRequest; import org.jclouds.rest.AuthorizationException; import org.jclouds.util.Strings2; -import org.testng.SkipException; import org.testng.annotations.Test; import com.google.common.util.concurrent.Uninterruptibles; @@ -94,8 +93,6 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { HttpRequest request = view.getSigner().signGetBlob(container, name, getSignedUrlTimeout()); assertEquals(request.getFilters().size(), 0); assertEquals(Strings2.toStringAndClose(view.utils().http().invoke(request).getPayload().openStream()), text); - } catch (UnsupportedOperationException ignore) { - throw new SkipException("signGetUrl with a time limit is not supported on " + provider); } finally { returnContainer(container); } @@ -119,8 +116,6 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { fail("Temporary URL did not expire as expected"); } catch (AuthorizationException expected) { } - } catch (UnsupportedOperationException ignore) { - throw new SkipException("signGetUrl with a time limit is not supported on " + provider); } finally { returnContainer(container); } @@ -159,8 +154,6 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { // http://www.docjar.com/html/api/sun/net/www/protocol/http/HttpURLConnection.java.html#1021 request = request.toBuilder().removeHeader(EXPECT).build(); Strings2.toStringAndClose(view.utils().http().invoke(request).getPayload().openStream()); - } catch (UnsupportedOperationException ignore) { - throw new SkipException("signPutUrl with a time limit is not supported on " + provider); } finally { returnContainer(container); } @@ -187,8 +180,6 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest { fail("Temporary URL did not expire as expected"); } catch (AuthorizationException expected) { } - } catch (UnsupportedOperationException ignore) { - throw new SkipException("signPutUrl with a time limit is not supported on " + provider); } finally { returnContainer(container); } http://git-wip-us.apache.org/repos/asf/jclouds/blob/a4c40e15/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/integration/AzureBlobSignerLiveTest.java ---------------------------------------------------------------------- diff --git a/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/integration/AzureBlobSignerLiveTest.java b/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/integration/AzureBlobSignerLiveTest.java index 5083e3e..55a7b8f 100644 --- a/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/integration/AzureBlobSignerLiveTest.java +++ b/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/integration/AzureBlobSignerLiveTest.java @@ -16,7 +16,10 @@ */ package org.jclouds.azureblob.blobstore.integration; +import java.io.IOException; + import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest; +import org.testng.SkipException; import org.testng.annotations.Test; @Test(groups = { "live" }) @@ -24,4 +27,40 @@ public class AzureBlobSignerLiveTest extends BaseBlobSignerLiveTest { public AzureBlobSignerLiveTest() { provider = "azureblob"; } + + @Test + public void testSignGetUrlWithTime() throws InterruptedException, IOException { + try { + super.testSignGetUrlWithTime(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Azure", uoe); + } + } + + @Test + public void testSignGetUrlWithTimeExpired() throws InterruptedException, IOException { + try { + super.testSignGetUrlWithTimeExpired(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Azure", uoe); + } + } + + @Test + public void testSignPutUrlWithTime() throws Exception { + try { + super.testSignPutUrlWithTime(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Azure", uoe); + } + } + + @Test + public void testSignPutUrlWithTimeExpired() throws Exception { + try { + super.testSignPutUrlWithTimeExpired(); + } catch (UnsupportedOperationException uoe) { + throw new SkipException("not supported in Azure", uoe); + } + } }
