You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2013/08/06 06:37:15 UTC

[1/2] git commit: Enable time-bound signed URL tests for HPCS.

Updated Branches:
  refs/heads/master f3df06aff -> 96c326d0c


Enable time-bound signed URL tests for HPCS.

HP does, in fact, support configurable temporary signed URLs:
http://docs.hpcloud.com/api/object-storage#temp_url

References JCLOUDS-231


Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/commit/96c326d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/tree/96c326d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/diff/96c326d0

Branch: refs/heads/master
Commit: 96c326d0cd6134e880d28ef617432ca9e84e164c
Parents: b2bf75f
Author: Diwaker Gupta <di...@maginatics.com>
Authored: Mon Aug 5 14:04:13 2013 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Mon Aug 5 21:36:42 2013 -0700

----------------------------------------------------------------------
 .../HPCloudObjectStorageBlobSignerLiveTest.java    | 17 -----------------
 1 file changed, 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/96c326d0/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
----------------------------------------------------------------------
diff --git a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
index 2bb01f6..06b7e2d 100644
--- a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
+++ b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/blobstore/integration/HPCloudObjectStorageBlobSignerLiveTest.java
@@ -30,21 +30,4 @@ public class HPCloudObjectStorageBlobSignerLiveTest extends SwiftBlobSignerLiveT
    public HPCloudObjectStorageBlobSignerLiveTest() {
       provider = "hpcloud-objectstorage";
    }
-
-   // hp doesn't yet support time-bound request signing
-   // https://api-docs.hpcloud.com/hpcloud-object-storage/1.0/content/ch_object-storage-dev-overview.html
-   @Override
-   @Test(expectedExceptions = AuthorizationException.class)
-   public void testSignGetUrlWithTime() throws InterruptedException, IOException {
-      super.testSignGetUrlWithTime();
-   }
-
-   // hp doesn't yet support time-bound request signing
-   // https://api-docs.hpcloud.com/hpcloud-object-storage/1.0/content/ch_object-storage-dev-overview.html
-   @Override
-   @Test(expectedExceptions = AuthorizationException.class)
-   public void testSignPutUrlWithTime() throws Exception {
-      super.testSignPutUrlWithTime();
-   }
-
 }


[2/2] git commit: Revert "A 401 error should result in re-authenticating for a new token"

Posted by ga...@apache.org.
Revert "A 401 error should result in re-authenticating for a new token"

This reverts commit 833f046a5ce54b1fc1ea1674d3baf743143fb517.

References JCLOUDS-231


Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/commit/b2bf75f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/tree/b2bf75f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds/diff/b2bf75f8

Branch: refs/heads/master
Commit: b2bf75f8efe2dac9b2c9d036a51a143d8b43ca67
Parents: f3df06a
Author: Andrew Gaul <ga...@apache.org>
Authored: Mon Aug 5 21:31:49 2013 -0700
Committer: Andrew Gaul <ga...@apache.org>
Committed: Mon Aug 5 21:36:42 2013 -0700

----------------------------------------------------------------------
 .../jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java   | 4 ++--
 .../openstack/keystone/v2_0/handlers/RetryOnRenewTest.java       | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/b2bf75f8/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
----------------------------------------------------------------------
diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
index 835e65e..d358484 100644
--- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
+++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenew.java
@@ -64,8 +64,8 @@ public class RetryOnRenew implements HttpRetryHandler {
                   retry = false;
                } else {
                   byte[] content = closeClientButKeepContentStream(response);
-                  // Error when the session token expires: HTTP/1.1 401 Unauthorized, no body (or provider-specific response body)
-                  if (content != null) {
+                  //TODO: what is the error when the session token expires??
+                  if (content != null && new String(content).contains("lease renew")) {
                      logger.debug("invalidating authentication token");
                      authenticationResponseCache.invalidateAll();
                      retry = true;

http://git-wip-us.apache.org/repos/asf/incubator-jclouds/blob/b2bf75f8/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
----------------------------------------------------------------------
diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
index 87beb37..f152701 100644
--- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
+++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/handlers/RetryOnRenewTest.java
@@ -53,7 +53,7 @@ public class RetryOnRenewTest {
       cache.invalidateAll();
       expectLastCall();
 
-      expect(response.getPayload()).andReturn(Payloads.newStringPayload("")).anyTimes();
+      expect(response.getPayload()).andReturn(Payloads.newStringPayload("token expired, please renew")).anyTimes();
       expect(response.getStatusCode()).andReturn(401).atLeastOnce();
 
       replay(command);