diff --git a/api/cache/cache_test.go b/api/cache/cache_test.go index 0f66215a1..0db074a18 100644 --- a/api/cache/cache_test.go +++ b/api/cache/cache_test.go @@ -153,7 +153,7 @@ func TestSettingsCacheType(t *testing.T) { cache := NewSystemCache(DefaultSystemConfig(logger)) key := "key" - settings := &data.BucketSettings{VersioningEnabled: true} + settings := &data.BucketSettings{Versioning: data.VerEnabled} err := cache.PutSettings(key, settings) require.NoError(t, err) diff --git a/api/handler/handlers_test.go b/api/handler/handlers_test.go index 72244a57e..9ab09f004 100644 --- a/api/handler/handlers_test.go +++ b/api/handler/handlers_test.go @@ -109,7 +109,7 @@ func createTestBucketWithLock(ctx context.Context, t *testing.T, h *handlerConte sp := &layer.PutSettingsParams{ BktInfo: bktInfo, Settings: &data.BucketSettings{ - VersioningEnabled: true, + Versioning: data.VerEnabled, LockConfiguration: conf, }, } diff --git a/api/handler/locking_test.go b/api/handler/locking_test.go index 06112cde1..17e088232 100644 --- a/api/handler/locking_test.go +++ b/api/handler/locking_test.go @@ -324,7 +324,7 @@ func TestPutBucketLockConfigurationHandler(t *testing.T) { bktSettings, err := hc.Layer().GetBucketSettings(ctx, bktInfo) require.NoError(t, err) actualConf := bktSettings.LockConfiguration - require.True(t, bktSettings.VersioningEnabled) + require.True(t, bktSettings.VersioningEnabled()) require.Equal(t, tc.configuration.ObjectLockEnabled, actualConf.ObjectLockEnabled) require.Equal(t, tc.configuration.Rule, actualConf.Rule) }) diff --git a/api/layer/locking_test.go b/api/layer/locking_test.go index f5abdd550..3c257d541 100644 --- a/api/layer/locking_test.go +++ b/api/layer/locking_test.go @@ -12,7 +12,7 @@ func TestObjectLockAttributes(t *testing.T) { tc := prepareContext(t) err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{ BktInfo: tc.bktInfo, - Settings: &data.BucketSettings{VersioningEnabled: true}, + Settings: &data.BucketSettings{Versioning: data.VerEnabled}, }) require.NoError(t, err) diff --git a/api/layer/versioning_test.go b/api/layer/versioning_test.go index ab3626a5f..46cbd7c02 100644 --- a/api/layer/versioning_test.go +++ b/api/layer/versioning_test.go @@ -183,7 +183,7 @@ func TestSimpleVersioning(t *testing.T) { tc := prepareContext(t) err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{ BktInfo: tc.bktInfo, - Settings: &data.BucketSettings{VersioningEnabled: true}, + Settings: &data.BucketSettings{Versioning: data.VerEnabled}, }) require.NoError(t, err) @@ -220,7 +220,7 @@ func TestSimpleNoVersioning(t *testing.T) { func TestVersioningDeleteObject(t *testing.T) { tc := prepareContext(t) - settings := &data.BucketSettings{VersioningEnabled: true} + settings := &data.BucketSettings{Versioning: data.VerEnabled} err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{ BktInfo: tc.bktInfo, Settings: settings, @@ -242,7 +242,7 @@ func TestGetUnversioned(t *testing.T) { objContent := []byte("content obj1 v1") objInfo := tc.putObject(objContent) - settings := &data.BucketSettings{VersioningEnabled: false} + settings := &data.BucketSettings{Versioning: data.VerUnversioned} err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{ BktInfo: tc.bktInfo, Settings: settings, @@ -256,7 +256,7 @@ func TestGetUnversioned(t *testing.T) { func TestVersioningDeleteSpecificObjectVersion(t *testing.T) { tc := prepareContext(t) - settings := &data.BucketSettings{VersioningEnabled: true} + settings := &data.BucketSettings{Versioning: data.VerEnabled} err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{ BktInfo: tc.bktInfo, Settings: settings,