Merge pull request #1476 from versity/sis/bucket-request-payment-actions-not-implemented

feat: adds not implemented routes for bucket request payment actions
This commit is contained in:
Ben McClelland
2025-08-20 17:10:54 -07:00
committed by GitHub
5 changed files with 68 additions and 0 deletions
+5
View File
@@ -648,6 +648,9 @@ func TestNotImplementedActions(s *S3Conf) {
// bucket logging actions
PutBucketLogging_not_implemented(s)
GetBucketLogging_not_implemented(s)
// request payment actions
PutBucketRequestPayment_not_implemented(s)
GetBucketRequestPayment_not_implemented(s)
}
func TestWORMProtection(s *S3Conf) {
@@ -1402,6 +1405,8 @@ func GetIntTests() IntTests {
"DeleteBucketLifecycle_not_implemented": DeleteBucketLifecycle_not_implemented,
"PutBucketLogging_not_implemented": PutBucketLogging_not_implemented,
"GetBucketLogging_not_implemented": GetBucketLogging_not_implemented,
"PutBucketRequestPayment_not_implemented": PutBucketRequestPayment_not_implemented,
"GetBucketRequestPayment_not_implemented": GetBucketRequestPayment_not_implemented,
"WORMProtection_bucket_object_lock_configuration_compliance_mode": WORMProtection_bucket_object_lock_configuration_compliance_mode,
"WORMProtection_bucket_object_lock_configuration_governance_mode": WORMProtection_bucket_object_lock_configuration_governance_mode,
"WORMProtection_bucket_object_lock_governance_bypass_delete": WORMProtection_bucket_object_lock_governance_bypass_delete,
+31
View File
@@ -15758,6 +15758,37 @@ func GetBucketLogging_not_implemented(s *S3Conf) error {
})
}
func PutBucketRequestPayment_not_implemented(s *S3Conf) error {
testName := "PutBucketRequestPayment_not_implemented"
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
_, err := s3client.PutBucketRequestPayment(ctx,
&s3.PutBucketRequestPaymentInput{
Bucket: &bucket,
RequestPaymentConfiguration: &types.RequestPaymentConfiguration{
Payer: types.PayerBucketOwner,
},
})
cancel()
return checkApiErr(err, s3err.GetAPIError(s3err.ErrNotImplemented))
})
}
func GetBucketRequestPayment_not_implemented(s *S3Conf) error {
testName := "GetBucketRequestPayment_not_implemented"
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
_, err := s3client.GetBucketRequestPayment(ctx,
&s3.GetBucketRequestPaymentInput{
Bucket: &bucket,
})
cancel()
return checkApiErr(err, s3err.GetAPIError(s3err.ErrNotImplemented))
})
}
func WORMProtection_bucket_object_lock_configuration_compliance_mode(s *S3Conf) error {
testName := "WORMProtection_bucket_object_lock_configuration_compliance_mode"
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {