Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/rest put bucket policy #967

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

lrm25
Copy link
Contributor

@lrm25 lrm25 commented Nov 26, 2024

No description provided.

@lrm25 lrm25 force-pushed the test/rest_put_bucket_policy branch 2 times, most recently from d161759 to bd7baef Compare December 3, 2024 14:44
later=$(date -j -v +15S -f "%Y-%m-%dT%H:%M:%S" "$now" +"%Y-%m-%dT%H:%M:%S")
else
now=$(date +"%Y-%m-%dT%H:%M:%S")
later=$(date -d "$now 15 seconds" +"%Y-%m-%dT%H:%M:%S")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be $now + 15 seconds? Looks like it is missing the addition symbol.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's the linux format for adding time. It works on my Linux machine. The addition symbol actually subtracts 15 hours for some reason.

run setup_user_versitygw_or_direct "$USERNAME_ONE" "$PASSWORD_ONE" "user" "$BUCKET_ONE_NAME"
assert_success
# shellcheck disable=SC2154
username=${lines[0]}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this assumed the setup_user_versitygw_or_direct returns a variable called "lines"? This could be a direct return from the function and would make the code more readable.

Copy link
Contributor Author

@lrm25 lrm25 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"lines" is a variable returned by bats (output lines in an array). Probably could do a direct (echo) return though, if you think it's necessary and/or better.

anodelman
anodelman previously approved these changes Dec 3, 2024
Copy link

@anodelman anodelman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarifications!

@lrm25 lrm25 dismissed anodelman’s stale review December 3, 2024 20:32

The merge-base changed after approval.

@lrm25 lrm25 force-pushed the test/rest_put_bucket_policy branch from bd7baef to a43eec0 Compare December 4, 2024 15:35
@benmcclelland benmcclelland merged commit c65a355 into main Dec 4, 2024
26 checks passed
@benmcclelland benmcclelland deleted the test/rest_put_bucket_policy branch December 4, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants