Skip to content

Commit

Permalink
ref #3 - failing test case for signed_urls
Browse files Browse the repository at this point in the history
sometimes AWS will return 403 codes for the generated signed_url
and this test case manages to reproduce that. TODO: fix
  • Loading branch information
leejo committed Aug 31, 2015
1 parent b4f219d commit 196845b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/010_basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ if(0) {
ok my $file = $bucket->file($key), "bucket.file($key) returned a file";
is $file->size, length($contents), 'file.size is correct';
is ${$file->contents}, $contents, 'file.contents is correct';
my $expiration_date = time() + 7 * 24 * 60 * 60;
my $url = $file->signed_url( $expiration_date );
is( $file->signed_url( $expiration_date ),$url,'signed_url same' ) for 1 .. 10;
my $res = $s3->ua->get( $url );
ok( $res->is_success,'get signed_url' );
isnt( $res->code,403,'not forbidden' );
last if $counted++ > 4;
}# end for()

Expand Down

0 comments on commit 196845b

Please sign in to comment.