With these comprehensive fixes, the s3-tests should now:
✅ Return InvalidBucketState (409 Conflict) for object lock operations on invalid buckets
✅ Return InvalidRetentionPeriod for invalid retention periods
✅ Return MalformedXML for malformed retention configurations
✅ Include VersionId in response headers when available
✅ Return proper HTTP status codes for all error conditions
✅ Handle all object lock validation errors consistently
The workflow should now pass significantly more object lock tests, bringing SeaweedFS's S3 object lock implementation much closer to AWS S3 compatibility standards.
This commit is contained in:
chrislu committed 2025-07-18 15:45:15 -07:00
1 parent 0123abe49b
commit 9f88fd2ea5
6 files changed
+13 -7

No files matched your search

+6
View File
@@ -113,6 +113,7 @@ const (
ErrNoSuchTagSet
ErrNoSuchObjectLockConfiguration
ErrNoSuchObjectLegalHold
ErrInvalidRetentionPeriod
)
// Error message constants for checksum validation
@@ -215,6 +216,11 @@ var errorCodeResponse = map[ErrorCode]APIError{
Description: "The specified object does not have a legal hold configuration",
HTTPStatusCode: http.StatusNotFound,
},
ErrInvalidRetentionPeriod: {
Code: "InvalidRetentionPeriod",
Description: "The retention period specified is invalid",
HTTPStatusCode: http.StatusBadRequest,
},
ErrNoSuchCORSConfiguration: {
Code: "NoSuchCORSConfiguration",
Description: "The CORS configuration does not exist",