Skip to content

Commit

Permalink
aws-sdk-php: fix AWS S3 compatible fixes (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored and kannappanr committed Apr 24, 2018
1 parent 628807f commit 554f65b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: bash
sudo: true
dist: trusty
sudo: required
addons:
apt:
packages:
Expand Down
14 changes: 7 additions & 7 deletions run/core/aws-sdk-php/quick-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ function getStatusCode($result):string {
* $apiCall = 'headBucket'
* $exceptionMatcher = 'getStatusCode'
* $exceptionParamMap = [
* // Invalid bucket name
* '400' => ['Bucket' => $bucket['Name'] . '--'],
* // Non existent bucket
* '404' => ['Bucket' => $bucket['Name'] . '--'],
*
* // Non existent bucket
* '404' => ['Bucket' => $bucket['Name'] . '-non-existent'],
* ];
*
* @return string - HTTP status code. E.g, "400" for Bad Request.
* @return string - HTTP status code. E.g, "404" for Non existent bucket.
*/
function runExceptionalTests($s3Client, $apiCall, $exceptionMatcher, $exceptionParamMap) {
foreach($exceptionParamMap as $exn => $params) {
Expand Down Expand Up @@ -161,8 +161,8 @@ function testBucketExists(S3Client $s3Client) {

// Run failure tests
$params = [
// Invalid bucket name
'400' => ['Bucket' => $bucket['Name'] . '--'],
// Non existent bucket
'404' => ['Bucket' => $bucket['Name'] . '--'],

// Non existent bucket
'404' => ['Bucket' => $bucket['Name'] . '-non-existent'],
Expand Down Expand Up @@ -645,8 +645,8 @@ function testGetBucketLocation($s3Client, $params) {

// Run failure tests.
$params = [
// InvalidBucketName test
'InvalidBucketName' => ['Bucket' => $bucket . '--'],
// Non existent bucket
'NoSuchBucket' => ['Bucket' => $bucket . '--'],

// Bucket not found
'NoSuchBucket' => ['Bucket' => $bucket . '-non-existent'],
Expand Down

0 comments on commit 554f65b

Please sign in to comment.