mirror of
https://github.com/versity/versitygw.git
synced 2026-09-08 09:06:59 +00:00
feat: adds not implemented routes for bucket intelligent tiering actions
Closes #1440 Adds `NotImplemented` routes for intelligent tiering S3 actions: - `PutBucketIntelligentTieringConfiguration` - `GetBucketIntelligentTieringConfiguration` - `ListBucketIntelligentTieringConfigurations` - `DeleteBucketIntelligentTieringConfiguration`
This commit is contained in:
@@ -593,6 +593,11 @@ func TestNotImplementedActions(s *S3Conf) {
|
||||
PutBucketEncryption_not_implemented(s)
|
||||
GetBucketEncryption_not_implemented(s)
|
||||
DeleteBucketEncryption_not_implemented(s)
|
||||
// bucket intelligent tierieng actions
|
||||
PutBucketIntelligentTieringConfiguration_not_implemented(s)
|
||||
GetBucketIntelligentTieringConfiguration_not_implemented(s)
|
||||
ListBucketIntelligentTieringConfiguration_not_implemented(s)
|
||||
DeleteBucketIntelligentTieringConfiguration_not_implemented(s)
|
||||
}
|
||||
|
||||
func TestWORMProtection(s *S3Conf) {
|
||||
@@ -1307,6 +1312,10 @@ func GetIntTests() IntTests {
|
||||
"PutBucketEncryption_not_implemented": PutBucketEncryption_not_implemented,
|
||||
"GetBucketEncryption_not_implemented": GetBucketEncryption_not_implemented,
|
||||
"DeleteBucketEncryption_not_implemented": DeleteBucketEncryption_not_implemented,
|
||||
"PutBucketIntelligentTieringConfiguration_not_implemented": PutBucketIntelligentTieringConfiguration_not_implemented,
|
||||
"GetBucketIntelligentTieringConfiguration_not_implemented": GetBucketIntelligentTieringConfiguration_not_implemented,
|
||||
"ListBucketIntelligentTieringConfiguration_not_implemented": ListBucketIntelligentTieringConfiguration_not_implemented,
|
||||
"DeleteBucketIntelligentTieringConfiguration_not_implemented": DeleteBucketIntelligentTieringConfiguration_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,
|
||||
|
||||
@@ -14718,6 +14718,76 @@ func DeleteBucketEncryption_not_implemented(s *S3Conf) error {
|
||||
})
|
||||
}
|
||||
|
||||
func PutBucketIntelligentTieringConfiguration_not_implemented(s *S3Conf) error {
|
||||
testName := "PutBucketIntelligentTieringConfiguration_not_implemented"
|
||||
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
|
||||
days := int32(32)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err := s3client.PutBucketIntelligentTieringConfiguration(ctx,
|
||||
&s3.PutBucketIntelligentTieringConfigurationInput{
|
||||
Bucket: &bucket,
|
||||
Id: getPtr("unique_id"),
|
||||
IntelligentTieringConfiguration: &types.IntelligentTieringConfiguration{
|
||||
Id: getPtr("my-id"),
|
||||
Status: types.IntelligentTieringStatusEnabled,
|
||||
Tierings: []types.Tiering{
|
||||
{
|
||||
AccessTier: types.IntelligentTieringAccessTierArchiveAccess,
|
||||
Days: &days,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
cancel()
|
||||
|
||||
return checkApiErr(err, s3err.GetAPIError(s3err.ErrNotImplemented))
|
||||
})
|
||||
}
|
||||
|
||||
func GetBucketIntelligentTieringConfiguration_not_implemented(s *S3Conf) error {
|
||||
testName := "GetBucketIntelligentTieringConfiguration_not_implemented"
|
||||
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err := s3client.GetBucketIntelligentTieringConfiguration(ctx,
|
||||
&s3.GetBucketIntelligentTieringConfigurationInput{
|
||||
Bucket: &bucket,
|
||||
Id: getPtr("unique_id"),
|
||||
})
|
||||
cancel()
|
||||
|
||||
return checkApiErr(err, s3err.GetAPIError(s3err.ErrNotImplemented))
|
||||
})
|
||||
}
|
||||
|
||||
func ListBucketIntelligentTieringConfiguration_not_implemented(s *S3Conf) error {
|
||||
testName := "ListBucketIntelligentTieringConfiguration_not_implemented"
|
||||
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err := s3client.ListBucketIntelligentTieringConfigurations(ctx,
|
||||
&s3.ListBucketIntelligentTieringConfigurationsInput{
|
||||
Bucket: &bucket,
|
||||
})
|
||||
cancel()
|
||||
|
||||
return checkApiErr(err, s3err.GetAPIError(s3err.ErrNotImplemented))
|
||||
})
|
||||
}
|
||||
|
||||
func DeleteBucketIntelligentTieringConfiguration_not_implemented(s *S3Conf) error {
|
||||
testName := "DeleteBucketIntelligentTieringConfiguration_not_implemented"
|
||||
return actionHandler(s, testName, func(s3client *s3.Client, bucket string) error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), shortTimeout)
|
||||
_, err := s3client.DeleteBucketIntelligentTieringConfiguration(ctx,
|
||||
&s3.DeleteBucketIntelligentTieringConfigurationInput{
|
||||
Bucket: &bucket,
|
||||
Id: getPtr("unique_id"),
|
||||
})
|
||||
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