-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
d161759
to
bd7baef
Compare
tests/test_s3api_multipart.sh
Outdated
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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
The merge-base changed after approval.
bd7baef
to
a43eec0
Compare
No description provided.