> +
> "?Signature=genkB2vLxe3AWV/bPvRTMqQts7E%3D&Expires=1212683902&AWSAccessKeyId=identity")
> + .addHeader("Expect", "100-continue")
> + .addHeader("Host", "container.s3.amazonaws.com")
> + .addHeader("Date", "Thu, 05 Jun 2008 16:38:19 GMT").build();
> + }
> +
> + @Test
> + public void testSignPutBlobWithTime() throws Exception {
> + BlobStore signPutBloblWithTime = requestsSendResponses(init());
> + Blob blob =
> signPutBloblWithTime.blobBuilder(name).payload(text).contentType("text/plain").build();
> + HttpRequest compare = putBlobWithTime();
> + compare.setPayload(blob.getPayload());
> +
> assertEquals(signPutBloblWithTime.getContext().getSigner().signPutBlob(container,
> blob, 3l /* seconds */),
> + compare);
> + }
> +
> what value would such a test add
To verify that logic we've added in this PR works as expected? If it's
currently exercised in one of the live or expect tests, obviously that's
enough. Or if we feel that scenario is simply not achievable (i.e. there's no
feasible way for a user to even _have_ a request double-signed), is the code
even needed?
Right now, as far as I understand (and please correct me if I'm wrong!) we're
adding a safeguard for which we can't find a trigger, and are not verifying
whether it works.
Of course, I see your point about similar code not having tests, and would not
want to hold up the PR for this - am just curious.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/71/files#r5362695