feat(s3): stub bucket configuration list endpoints (#9571)

* feat(s3): stub bucket configuration list endpoints

Adds Get and List handlers for Analytics, Inventory, IntelligentTiering,
and Metrics bucket configurations. List returns an empty result with
IsTruncated=false; single-get returns NoSuchConfiguration so SDK error
parsing remains predictable.

* review: gate stubs on bucket existence

All eight stub handlers now call checkBucket via stubBucketGuard so
NoSuchBucket takes precedence over NoSuchConfiguration / empty-list
responses, matching AWS S3 precedence. Tests provide a cached bucket
so the guard sees it as present.
This commit is contained in:
Chris Lu
2026-05-19 17:34:51 -07:00
committed by GitHub
parent 285025eb73
commit cee2bf697c
4 changed files with 207 additions and 0 deletions
+8
View File
@@ -149,6 +149,8 @@ const (
// Object key length errors
ErrKeyTooLongError
ErrNoSuchConfiguration
)
// Error message constants for checksum validation
@@ -623,6 +625,12 @@ var errorCodeResponse = map[ErrorCode]APIError{
Description: "Your key is too long.",
HTTPStatusCode: http.StatusBadRequest,
},
ErrNoSuchConfiguration: {
Code: "NoSuchConfiguration",
Description: "The specified configuration does not exist.",
HTTPStatusCode: http.StatusNotFound,
},
}
// GetAPIError provides API Error for input API error code.