[#1598] engine: Drop unnecessary result structs
All checks were successful
DCO action / DCO (pull_request) Successful in 31s
Tests and linters / Run gofumpt (pull_request) Successful in 29s
Vulncheck / Vulncheck (pull_request) Successful in 54s
Build / Build Components (pull_request) Successful in 1m29s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m28s
Tests and linters / gopls check (pull_request) Successful in 2m15s
Tests and linters / Lint (pull_request) Successful in 2m41s
Tests and linters / Staticcheck (pull_request) Successful in 2m49s
Tests and linters / Tests (pull_request) Successful in 3m52s
Tests and linters / Tests with -race (pull_request) Successful in 5m1s
Vulncheck / Vulncheck (push) Successful in 1m5s
Pre-commit hooks / Pre-commit (push) Successful in 1m19s
Build / Build Components (push) Successful in 1m36s
Tests and linters / gopls check (push) Successful in 2m16s
Tests and linters / Run gofumpt (push) Successful in 2m32s
Tests and linters / Staticcheck (push) Successful in 2m49s
Tests and linters / Lint (push) Successful in 3m10s
Tests and linters / Tests (push) Successful in 3m12s
Tests and linters / Tests with -race (push) Successful in 4m15s
All checks were successful
DCO action / DCO (pull_request) Successful in 31s
Tests and linters / Run gofumpt (pull_request) Successful in 29s
Vulncheck / Vulncheck (pull_request) Successful in 54s
Build / Build Components (pull_request) Successful in 1m29s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m28s
Tests and linters / gopls check (pull_request) Successful in 2m15s
Tests and linters / Lint (pull_request) Successful in 2m41s
Tests and linters / Staticcheck (pull_request) Successful in 2m49s
Tests and linters / Tests (pull_request) Successful in 3m52s
Tests and linters / Tests with -race (pull_request) Successful in 5m1s
Vulncheck / Vulncheck (push) Successful in 1m5s
Pre-commit hooks / Pre-commit (push) Successful in 1m19s
Build / Build Components (push) Successful in 1m36s
Tests and linters / gopls check (push) Successful in 2m16s
Tests and linters / Run gofumpt (push) Successful in 2m32s
Tests and linters / Staticcheck (push) Successful in 2m49s
Tests and linters / Lint (push) Successful in 3m10s
Tests and linters / Tests (push) Successful in 3m12s
Tests and linters / Tests with -race (push) Successful in 4m15s
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