forked from TrueCloudLab/frostfs-s3-gw
parent
ce543e910c
commit
3b343d1bd5
1 changed files with 13 additions and 11 deletions
|
@ -18,22 +18,24 @@ func TestObjectLockAttributes(t *testing.T) {
|
||||||
|
|
||||||
obj := tc.putObject([]byte("content obj1 v1"))
|
obj := tc.putObject([]byte("content obj1 v1"))
|
||||||
|
|
||||||
p := &ObjectVersion{
|
p := &PutLockInfoParams{
|
||||||
|
ObjVersion: &ObjectVersion{
|
||||||
BktInfo: tc.bktInfo,
|
BktInfo: tc.bktInfo,
|
||||||
ObjectName: obj.Name,
|
ObjectName: obj.Name,
|
||||||
VersionID: obj.VersionID(),
|
VersionID: obj.VersionID(),
|
||||||
}
|
},
|
||||||
|
NewLock: &data.ObjectLock{
|
||||||
lock := &data.ObjectLock{
|
|
||||||
Retention: &data.RetentionLock{
|
Retention: &data.RetentionLock{
|
||||||
Until: time.Now(),
|
Until: time.Now(),
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
CopiesNumber: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
err = tc.layer.PutLockInfo(tc.ctx, p, lock)
|
err = tc.layer.PutLockInfo(tc.ctx, p)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
foundLock, err := tc.layer.GetLockInfo(tc.ctx, p)
|
foundLock, err := tc.layer.GetLockInfo(tc.ctx, p.ObjVersion)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
lockObj := tc.getObjectByID(foundLock.Retention())
|
lockObj := tc.getObjectByID(foundLock.Retention())
|
||||||
|
|
Loading…
Reference in a new issue