-
Notifications
You must be signed in to change notification settings - Fork 653
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
Adjust testPresignedPostPolicy to ensure that GetObject... #1996
Adjust testPresignedPostPolicy to ensure that GetObject... #1996
Conversation
df3d6c9
to
5de5dbe
Compare
logError(testName, function, args, startTime, "", "PutObject failed", err) | ||
return | ||
} | ||
|
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.
I think this was just a copy paste mistake, not sure why we were doing a PutObject here, as we are running the PostPolicy presigned request via the http client further down.
5de5dbe
to
cf2b561
Compare
FYI to myself: minio/minio#18074 (comment) |
cf2b561
to
301e5dc
Compare
Converted to draft temporarily while I complete the MinIO side. |
fee2c7b
to
efc148e
Compare
policy := minio.NewPostPolicy() | ||
|
||
if err := policy.SetBucket(""); err == nil { |
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.
I moved these negative tests into post-policy_test.go, and then added some more test cases in that file.
return | ||
} | ||
|
||
// Ensure that when we subsequently GetObject, the checksum is returned |
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.
This was the original user request - to have the checksum value returned when doing a GetObject, after doing a Post Policy. That functionality was already merged in MinIO weeks ago so this just adds the test for it.
functional_tests.go
Outdated
@@ -5641,9 +5643,6 @@ func testPresignedPostPolicy() { | |||
"policy": "", | |||
} | |||
|
|||
// Seed random based on current time. | |||
rand.Seed(time.Now().Unix()) |
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.
Deprecated, we can remove this call from every test, I might make a follow up PR to do the rest.
efc148e
to
7289296
Compare
@klauspost ready for a re-review when you get a moment :) |
6ce6043
to
913700e
Compare
…orrect checksum. Add checksum headers to policy
f770da7
to
54e0d3f
Compare
54e0d3f
to
946372d
Compare
...returns the correct checksum.
testPresignedPostPolicyWrongFile
to validate Checksums check negative caseFor the following issue: minio/minio#20343
Related PR: minio/minio#20674