diff --git a/gen3/bin/s3.sh b/gen3/bin/s3.sh index 0625bdf83..0801022ab 100644 --- a/gen3/bin/s3.sh +++ b/gen3/bin/s3.sh @@ -169,6 +169,7 @@ gen3_s3_info() { local writerName="bucket_writer_$1" local readerName="bucket_reader_$1" local AWS_ACCOUNT_ID=$(gen3_aws_run aws sts get-caller-identity | jq -r .Account) + local bucketName=$1 if [[ -z "$AWS_ACCOUNT_ID" ]]; then gen3_log_err "Unable to fetch AWS account ID." diff --git a/gen3/test/s3Test.sh b/gen3/test/s3Test.sh index 6630df23e..dc24ded1f 100644 --- a/gen3/test/s3Test.sh +++ b/gen3/test/s3Test.sh @@ -59,7 +59,7 @@ test_s3_info() { } ! gen3_s3_info bogus-bucket; because $? "when bucket doesn't exist it should fail" - policies=$(gen3_s3_info real-bucket); because $? "when bucket and policies exist it should succeed" + policies=$(gen3_s3_info real-bucket-ci); because $? "when bucket and policies exist it should succeed" readOnly="$(echo $policies | jq '."read-only"')" readWrite="$(echo $policies | jq '."read-write"')" [[ "$readOnly" != "{}" && "$readOnly" != "null" && "$readOnly" != "" ]]; because $? "when bucket and policies exist the result should include read-only policy"