mirror of
https://github.com/versity/versitygw.git
synced 2026-09-19 14:34:19 +00:00
feat: adds not implemented routes for bucket notification configuration actions
Closes #1453 Adds `NotImplemented` routes for bucket notification configuration S3 actions: - `PutBucketNotificationConfiguration` - `GetBucketNotificationConfiguration`
This commit is contained in:
@@ -663,6 +663,9 @@ func TestNotImplementedActions(s *S3Conf) {
|
||||
PutPublicAccessBlock_not_implemented(s)
|
||||
GetPublicAccessBlock_not_implemented(s)
|
||||
DeletePublicAccessBlock_not_implemented(s)
|
||||
// bucket notification actions
|
||||
PutBucketNotificationConfiguratio_not_implemented(s)
|
||||
GetBucketNotificationConfiguratio_not_implemented(s)
|
||||
}
|
||||
|
||||
func TestWORMProtection(s *S3Conf) {
|
||||
@@ -1428,6 +1431,8 @@ func GetIntTests() IntTests {
|
||||
"PutPublicAccessBlock_not_implemented": PutPublicAccessBlock_not_implemented,
|
||||
"GetPublicAccessBlock_not_implemented": GetPublicAccessBlock_not_implemented,
|
||||
"DeletePublicAccessBlock_not_implemented": DeletePublicAccessBlock_not_implemented,
|
||||
"PutBucketNotificationConfiguratio_not_implemented": PutBucketNotificationConfiguratio_not_implemented,
|
||||
"GetBucketNotificationConfiguratio_not_implemented": GetBucketNotificationConfiguratio_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,
|
||||
|
||||
@@ -15934,6 +15934,37 @@ func DeletePublicAccessBlock_not_implemented(s *S3Conf) error {
|
||||
})
|
||||
}
|
||||
|
||||
func PutBucketNotificationConfiguratio_not_implemented(s *S3Conf) error {
|
||||
testName := "PutBucketNotificationConfiguratio_not_implemented"
|
||||
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err := s3client.PutBucketNotificationConfiguration(ctx,
|
||||
&s3.PutBucketNotificationConfigurationInput{
|
||||
Bucket: &bucket,
|
||||
NotificationConfiguration: &types.NotificationConfiguration{
|
||||
EventBridgeConfiguration: &types.EventBridgeConfiguration{},
|
||||
},
|
||||
})
|
||||
cancel()
|
||||
|
||||
return checkApiErr(err, s3err.GetAPIError(s3err.ErrNotImplemented))
|
||||
})
|
||||
}
|
||||
|
||||
func GetBucketNotificationConfiguratio_not_implemented(s *S3Conf) error {
|
||||
testName := "GetBucketNotificationConfiguratio_not_implemented"
|
||||
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err := s3client.GetBucketNotificationConfiguration(ctx,
|
||||
&s3.GetBucketNotificationConfigurationInput{
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user