[#210] policier: Resolve contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
9098d0eec0
commit
23575e1ac0
15 changed files with 58 additions and 54 deletions
|
@ -111,7 +111,7 @@ func TestLockUserScenario(t *testing.T) {
|
|||
var inhumePrm InhumePrm
|
||||
inhumePrm.WithTarget(tombAddr, objAddr)
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectLocked))
|
||||
|
||||
// 4.
|
||||
|
@ -124,7 +124,7 @@ func TestLockUserScenario(t *testing.T) {
|
|||
|
||||
inhumePrm.WithTarget(tombForLockAddr, lockerAddr)
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorIs(t, err, meta.ErrLockObjectRemoval)
|
||||
|
||||
// 5.
|
||||
|
@ -135,7 +135,7 @@ func TestLockUserScenario(t *testing.T) {
|
|||
|
||||
inhumePrm.WithTarget(tombAddr, objAddr)
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ func TestLockExpiration(t *testing.T) {
|
|||
var inhumePrm InhumePrm
|
||||
inhumePrm.WithTarget(oidtest.Address(), objectcore.AddressOf(obj))
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectLocked))
|
||||
|
||||
// 3.
|
||||
|
@ -205,7 +205,7 @@ func TestLockExpiration(t *testing.T) {
|
|||
// 4.
|
||||
inhumePrm.WithTarget(oidtest.Address(), objectcore.AddressOf(obj))
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
@ -259,12 +259,12 @@ func TestLockForceRemoval(t *testing.T) {
|
|||
var inhumePrm InhumePrm
|
||||
inhumePrm.MarkAsGarbage(objectcore.AddressOf(obj))
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectLocked))
|
||||
|
||||
inhumePrm.WithTarget(oidtest.Address(), objectcore.AddressOf(obj))
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.ErrorAs(t, err, new(apistatus.ObjectLocked))
|
||||
|
||||
// 4.
|
||||
|
@ -272,12 +272,12 @@ func TestLockForceRemoval(t *testing.T) {
|
|||
deletePrm.WithAddress(objectcore.AddressOf(lock))
|
||||
deletePrm.WithForceRemoval()
|
||||
|
||||
_, err = e.Delete(deletePrm)
|
||||
_, err = e.Delete(context.Background(), deletePrm)
|
||||
require.NoError(t, err)
|
||||
|
||||
// 5.
|
||||
inhumePrm.MarkAsGarbage(objectcore.AddressOf(obj))
|
||||
|
||||
_, err = e.Inhume(inhumePrm)
|
||||
_, err = e.Inhume(context.Background(), inhumePrm)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue