Skip to content

Commit

Permalink
passing in "bucketName" for the modified s3_info function. Also, crea…
Browse files Browse the repository at this point in the history
…ted a new bucket as "real-bucket-ci" since "real-bucket" does not exist and the terraform was broken for that bucket.
  • Loading branch information
EliseCastle23 committed Jan 15, 2025
1 parent 9846869 commit 0e23619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions gen3/bin/s3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion gen3/test/s3Test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0e23619

Please sign in to comment.