-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #625 from versity/test_cmdline_static_fix
test: static bucket config debugging, add to github-actions
- Loading branch information
Showing
9 changed files
with
148 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
source ./tests/setup.sh | ||
source ./tests/util.sh | ||
source ./tests/commands/delete_bucket.sh | ||
|
||
delete_bucket_if_exists() { | ||
if [[ $# -ne 2 ]]; then | ||
log 2 "delete_bucket_if_exists command missing command type, name" | ||
return 1 | ||
fi | ||
bucket_exists "$1" "$2" || local exists_result=$? | ||
if [[ $exists_result -eq 2 ]]; then | ||
log 2 "error checking if bucket exists" | ||
return 1 | ||
fi | ||
if [[ $exists_result -eq 1 ]]; then | ||
log 5 "bucket '$2' doesn't exist, skipping" | ||
return 0 | ||
fi | ||
if ! delete_bucket "$1" "$2"; then | ||
log 2 "error deleting bucket" | ||
return 1 | ||
fi | ||
log 5 "bucket '$2' successfully deleted" | ||
return 0 | ||
} | ||
|
||
if ! setup; then | ||
log 2 "error starting versity to set up static buckets" | ||
exit 1 | ||
fi | ||
if ! delete_bucket_if_exists "s3api" "$BUCKET_ONE_NAME"; then | ||
log 2 "error deleting static bucket one" | ||
elif ! delete_bucket_if_exists "s3api" "$BUCKET_TWO_NAME"; then | ||
log 2 "error deleting static bucket two" | ||
fi | ||
if ! teardown; then | ||
log 2 "error stopping versity" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,40 @@ | ||
#!/bin/bash | ||
|
||
source ./tests/setup.sh | ||
setup | ||
aws --no-verify-ssl s3 mb s3://"$BUCKET_ONE_NAME" | ||
aws --no-verify-ssl s3 mb s3://"$BUCKET_TWO_NAME" | ||
teardown | ||
source ./tests/util.sh | ||
source ./tests/commands/create_bucket.sh | ||
|
||
create_bucket_if_not_exists() { | ||
if [[ $# -ne 2 ]]; then | ||
log 2 "create_bucket_if_not_exists command missing command type, name" | ||
return 1 | ||
fi | ||
bucket_exists "$1" "$2" || local exists_result=$? | ||
if [[ $exists_result -eq 2 ]]; then | ||
log 2 "error checking if bucket exists" | ||
return 1 | ||
fi | ||
if [[ $exists_result -eq 0 ]]; then | ||
log 5 "bucket '$2' already exists, skipping" | ||
return 0 | ||
fi | ||
if ! create_bucket_object_lock_enabled "$2"; then | ||
log 2 "error creating bucket" | ||
return 1 | ||
fi | ||
log 5 "bucket '$2' successfully created" | ||
return 0 | ||
} | ||
|
||
if ! setup; then | ||
log 2 "error starting versity to set up static buckets" | ||
exit 1 | ||
fi | ||
if ! create_bucket_if_not_exists "s3api" "$BUCKET_ONE_NAME"; then | ||
log 2 "error creating static bucket one" | ||
elif ! create_bucket_if_not_exists "s3api" "$BUCKET_TWO_NAME"; then | ||
log 2 "error creating static bucket two" | ||
fi | ||
if ! teardown; then | ||
log 2 "error stopping versity" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.