mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +03:00
cleanup object-lock/bucket tagging for gateways (#9548)
This PR is to ensure that we call the relevant object
layer APIs for necessary S3 API level functionalities
allowing gateway implementations to return proper
errors as NotImplemented{}
This allows for all our tests in mint to behave
appropriately and can be handled appropriately as
well.
This commit is contained in:
+6
-8
@@ -154,14 +154,12 @@ func (b *bucketMetadata) save(ctx context.Context, o ObjectLayer) error {
|
||||
return saveConfig(ctx, o, configFile, data)
|
||||
}
|
||||
|
||||
// delete the config metadata.
|
||||
// removeBucketMeta bucket metadata.
|
||||
// If config does not exist no error is returned.
|
||||
func (b bucketMetadata) delete(ctx context.Context, o ObjectLayer) error {
|
||||
configFile := path.Join(bucketConfigPrefix, b.Name, bucketMetadataFile)
|
||||
err := deleteConfig(ctx, o, configFile)
|
||||
if err == errConfigNotFound {
|
||||
// We don't care
|
||||
err = nil
|
||||
func removeBucketMeta(ctx context.Context, obj ObjectLayer, bucket string) error {
|
||||
configFile := path.Join(bucketConfigPrefix, bucket, bucketMetadataFile)
|
||||
if err := deleteConfig(ctx, obj, configFile); err != nil && err != errConfigNotFound {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user