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"))
|
||||
|
||||
p := &ObjectVersion{
|
||||
BktInfo: tc.bktInfo,
|
||||
ObjectName: obj.Name,
|
||||
VersionID: obj.VersionID(),
|
||||
}
|
||||
|
||||
lock := &data.ObjectLock{
|
||||
Retention: &data.RetentionLock{
|
||||
Until: time.Now(),
|
||||
p := &PutLockInfoParams{
|
||||
ObjVersion: &ObjectVersion{
|
||||
BktInfo: tc.bktInfo,
|
||||
ObjectName: obj.Name,
|
||||
VersionID: obj.VersionID(),
|
||||
},
|
||||
NewLock: &data.ObjectLock{
|
||||
Retention: &data.RetentionLock{
|
||||
Until: time.Now(),
|
||||
},
|
||||
},
|
||||
CopiesNumber: 0,
|
||||
}
|
||||
|
||||
err = tc.layer.PutLockInfo(tc.ctx, p, lock)
|
||||
err = tc.layer.PutLockInfo(tc.ctx, p)
|
||||
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)
|
||||
|
||||
lockObj := tc.getObjectByID(foundLock.Retention())
|
||||
|
|
Loading…
Reference in a new issue