Adjust testPresignedPostPolicy to ensure that GetObject...#1996
Adjust testPresignedPostPolicy to ensure that GetObject...#1996harshavardhana merged 2 commits intominio:masterfrom
Conversation
df3d6c9 to
5de5dbe
Compare
| logError(testName, function, args, startTime, "", "PutObject failed", err) | ||
| return | ||
| } | ||
|
|
There was a problem hiding this comment.
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.
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.
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
| } | ||
|
|
||
| // Seed random based on current time. | ||
| rand.Seed(time.Now().Unix()) |
There was a problem hiding this comment.
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
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) | require | patch | `v7.0.78` -> `v7.0.83` | --- ### Release Notes <details> <summary>minio/minio-go (github.com/minio/minio-go/v7)</summary> ### [`v7.0.83`](minio/minio-go@v7.0.82...v7.0.83) [Compare Source](minio/minio-go@v7.0.82...v7.0.83) ### [`v7.0.82`](https://github.com/minio/minio-go/releases/tag/v7.0.82): Bugfix Release [Compare Source](minio/minio-go@v7.0.81...v7.0.82) #### What's Changed - sts: Send the refresh token in the login redirect URL by [@​vadmeste](https://github.com/vadmeste) in minio/minio-go#2025 - Fix duplicate API call on `obj.Stat()` by [@​OrkhanAlikhanov](https://github.com/OrkhanAlikhanov) in minio/minio-go#2028 - Fix for tests running in mint vs locally by [@​marktheunissen](https://github.com/marktheunissen) in minio/minio-go#2029 - Add Full Object Checksum API by [@​klauspost](https://github.com/klauspost) in minio/minio-go#2026 - Read ChecksumAlgorithm and ChecksumType from ListParts by [@​klauspost](https://github.com/klauspost) in minio/minio-go#2032 - Bump golang.org/x/crypto from 0.28.0 to 0.31.0 in /examples/s3 by [@​dependabot](https://github.com/dependabot) in minio/minio-go#2033 #### New Contributors - [@​OrkhanAlikhanov](https://github.com/OrkhanAlikhanov) made their first contribution in minio/minio-go#2028 **Full Changelog**: minio/minio-go@v7.0.81...v7.0.82 ### [`v7.0.81`](https://github.com/minio/minio-go/releases/tag/v7.0.81): Bugfix Release [Compare Source](minio/minio-go@v7.0.80...v7.0.81) #### What's Changed - PromptObject API support by [@​sidharthrajaram](https://github.com/sidharthrajaram) in minio/minio-go#2015 - Fix new lint errors by [@​klauspost](https://github.com/klauspost) in minio/minio-go#2020 - functional tests: move client creation into a reusable function by [@​marktheunissen](https://github.com/marktheunissen) in minio/minio-go#2022 - Adjust testPresignedPostPolicy to ensure that GetObject... by [@​marktheunissen](https://github.com/marktheunissen) in minio/minio-go#1996 - Add refresh token to WebIdentity OpenID response by [@​vadmeste](https://github.com/vadmeste) in minio/minio-go#2023 #### New Contributors - [@​sidharthrajaram](https://github.com/sidharthrajaram) made their first contribution in minio/minio-go#2015 **Full Changelog**: minio/minio-go@v7.0.80...v7.0.81 ### [`v7.0.80`](https://github.com/minio/minio-go/releases/tag/v7.0.80): Bugfix Release [Compare Source](minio/minio-go@v7.0.79...v7.0.80) #### What's Changed - Add support for AllVersionsExpiration ilm rule by [@​dhananjaykrutika](https://github.com/dhananjaykrutika) in minio/minio-go#2014 - retry: make max retries configurable by [@​ashwanthgoli](https://github.com/ashwanthgoli) in minio/minio-go#2013 #### New Contributors - [@​dhananjaykrutika](https://github.com/dhananjaykrutika) made their first contribution in minio/minio-go#2014 - [@​ashwanthgoli](https://github.com/ashwanthgoli) made their first contribution in minio/minio-go#2013 **Full Changelog**: minio/minio-go@v7.0.79...v7.0.80 ### [`v7.0.79`](https://github.com/minio/minio-go/releases/tag/v7.0.79): Bugfix Release [Compare Source](minio/minio-go@v7.0.78...v7.0.79) #### What's Changed - Update remove bucket replication reference by [@​emmanuel-ferdman](https://github.com/emmanuel-ferdman) in minio/minio-go#2006 - Only retry multi-part upload as single-part upload on GCS endpoints by [@​ramondeklein](https://github.com/ramondeklein) in minio/minio-go#2012 #### New Contributors - [@​emmanuel-ferdman](https://github.com/emmanuel-ferdman) made their first contribution in minio/minio-go#2006 **Full Changelog**: minio/minio-go@v7.0.78...v7.0.79 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45MS4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTEuMCIsInRhcmdldEJyYW5jaCI6ImZvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19--> Co-authored-by: Gusted <postmaster@gusted.xyz> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6479 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
...returns the correct checksum.
testPresignedPostPolicyWrongFileto validate Checksums check negative caseFor the following issue: minio/minio#20343
Related PR: minio/minio#20674