forked from TrueCloudLab/frostfs-node
[#1598] engine: Drop unnecessary result structs
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
fb928616cc
commit
eff95bd632
7 changed files with 36 additions and 59 deletions
|
@ -114,7 +114,7 @@ func TestLockUserScenario(t *testing.T) {
|
|||
inhumePrm.WithTarget(tombAddr, objAddr)
|
||||
|
||||
var objLockedErr *apistatus.ObjectLocked
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, &objLockedErr)
|
||||
|
||||
// 4.
|
||||
|
@ -127,7 +127,7 @@ func TestLockUserScenario(t *testing.T) {
|
|||
|
||||
inhumePrm.WithTarget(tombForLockAddr, lockerAddr)
|
||||
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorIs(t, err, meta.ErrLockObjectRemoval)
|
||||
|
||||
// 5.
|
||||
|
@ -136,7 +136,7 @@ func TestLockUserScenario(t *testing.T) {
|
|||
inhumePrm.WithTarget(tombAddr, objAddr)
|
||||
|
||||
require.Eventually(t, func() bool {
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
return err == nil
|
||||
}, 30*time.Second, time.Second)
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ func TestLockExpiration(t *testing.T) {
|
|||
inhumePrm.WithTarget(tombAddr, objectcore.AddressOf(obj))
|
||||
|
||||
var objLockedErr *apistatus.ObjectLocked
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, &objLockedErr)
|
||||
|
||||
// 3.
|
||||
|
@ -212,7 +212,7 @@ func TestLockExpiration(t *testing.T) {
|
|||
inhumePrm.WithTarget(tombAddr, objectcore.AddressOf(obj))
|
||||
|
||||
require.Eventually(t, func() bool {
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
return err == nil
|
||||
}, 30*time.Second, time.Second)
|
||||
}
|
||||
|
@ -270,12 +270,12 @@ func TestLockForceRemoval(t *testing.T) {
|
|||
inhumePrm.MarkAsGarbage(objectcore.AddressOf(obj))
|
||||
|
||||
var objLockedErr *apistatus.ObjectLocked
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, &objLockedErr)
|
||||
|
||||
inhumePrm.WithTarget(oidtest.Address(), objectcore.AddressOf(obj))
|
||||
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, &objLockedErr)
|
||||
|
||||
// 4.
|
||||
|
@ -283,13 +283,12 @@ func TestLockForceRemoval(t *testing.T) {
|
|||
deletePrm.WithAddress(objectcore.AddressOf(lock))
|
||||
deletePrm.WithForceRemoval()
|
||||
|
||||
_, err = e.Delete(context.Background(), deletePrm)
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, e.Delete(context.Background(), deletePrm))
|
||||
|
||||
// 5.
|
||||
inhumePrm.MarkAsGarbage(objectcore.AddressOf(obj))
|
||||
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue