forked from TrueCloudLab/frostfs-s3-gw
parent
72013e08ec
commit
77f466b1d5
5 changed files with 8 additions and 8 deletions
2
api/cache/cache_test.go
vendored
2
api/cache/cache_test.go
vendored
|
@ -153,7 +153,7 @@ func TestSettingsCacheType(t *testing.T) {
|
||||||
cache := NewSystemCache(DefaultSystemConfig(logger))
|
cache := NewSystemCache(DefaultSystemConfig(logger))
|
||||||
|
|
||||||
key := "key"
|
key := "key"
|
||||||
settings := &data.BucketSettings{VersioningEnabled: true}
|
settings := &data.BucketSettings{Versioning: data.VerEnabled}
|
||||||
|
|
||||||
err := cache.PutSettings(key, settings)
|
err := cache.PutSettings(key, settings)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
|
@ -109,7 +109,7 @@ func createTestBucketWithLock(ctx context.Context, t *testing.T, h *handlerConte
|
||||||
sp := &layer.PutSettingsParams{
|
sp := &layer.PutSettingsParams{
|
||||||
BktInfo: bktInfo,
|
BktInfo: bktInfo,
|
||||||
Settings: &data.BucketSettings{
|
Settings: &data.BucketSettings{
|
||||||
VersioningEnabled: true,
|
Versioning: data.VerEnabled,
|
||||||
LockConfiguration: conf,
|
LockConfiguration: conf,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,7 +324,7 @@ func TestPutBucketLockConfigurationHandler(t *testing.T) {
|
||||||
bktSettings, err := hc.Layer().GetBucketSettings(ctx, bktInfo)
|
bktSettings, err := hc.Layer().GetBucketSettings(ctx, bktInfo)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
actualConf := bktSettings.LockConfiguration
|
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.ObjectLockEnabled, actualConf.ObjectLockEnabled)
|
||||||
require.Equal(t, tc.configuration.Rule, actualConf.Rule)
|
require.Equal(t, tc.configuration.Rule, actualConf.Rule)
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,7 +12,7 @@ func TestObjectLockAttributes(t *testing.T) {
|
||||||
tc := prepareContext(t)
|
tc := prepareContext(t)
|
||||||
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
||||||
BktInfo: tc.bktInfo,
|
BktInfo: tc.bktInfo,
|
||||||
Settings: &data.BucketSettings{VersioningEnabled: true},
|
Settings: &data.BucketSettings{Versioning: data.VerEnabled},
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ func TestSimpleVersioning(t *testing.T) {
|
||||||
tc := prepareContext(t)
|
tc := prepareContext(t)
|
||||||
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
||||||
BktInfo: tc.bktInfo,
|
BktInfo: tc.bktInfo,
|
||||||
Settings: &data.BucketSettings{VersioningEnabled: true},
|
Settings: &data.BucketSettings{Versioning: data.VerEnabled},
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ func TestSimpleNoVersioning(t *testing.T) {
|
||||||
|
|
||||||
func TestVersioningDeleteObject(t *testing.T) {
|
func TestVersioningDeleteObject(t *testing.T) {
|
||||||
tc := prepareContext(t)
|
tc := prepareContext(t)
|
||||||
settings := &data.BucketSettings{VersioningEnabled: true}
|
settings := &data.BucketSettings{Versioning: data.VerEnabled}
|
||||||
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
||||||
BktInfo: tc.bktInfo,
|
BktInfo: tc.bktInfo,
|
||||||
Settings: settings,
|
Settings: settings,
|
||||||
|
@ -242,7 +242,7 @@ func TestGetUnversioned(t *testing.T) {
|
||||||
objContent := []byte("content obj1 v1")
|
objContent := []byte("content obj1 v1")
|
||||||
objInfo := tc.putObject(objContent)
|
objInfo := tc.putObject(objContent)
|
||||||
|
|
||||||
settings := &data.BucketSettings{VersioningEnabled: false}
|
settings := &data.BucketSettings{Versioning: data.VerUnversioned}
|
||||||
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
||||||
BktInfo: tc.bktInfo,
|
BktInfo: tc.bktInfo,
|
||||||
Settings: settings,
|
Settings: settings,
|
||||||
|
@ -256,7 +256,7 @@ func TestGetUnversioned(t *testing.T) {
|
||||||
|
|
||||||
func TestVersioningDeleteSpecificObjectVersion(t *testing.T) {
|
func TestVersioningDeleteSpecificObjectVersion(t *testing.T) {
|
||||||
tc := prepareContext(t)
|
tc := prepareContext(t)
|
||||||
settings := &data.BucketSettings{VersioningEnabled: true}
|
settings := &data.BucketSettings{Versioning: data.VerEnabled}
|
||||||
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
err := tc.layer.PutBucketSettings(tc.ctx, &PutSettingsParams{
|
||||||
BktInfo: tc.bktInfo,
|
BktInfo: tc.bktInfo,
|
||||||
Settings: settings,
|
Settings: settings,
|
||||||
|
|
Loading…
Reference in a new issue