policer: Add "bad" testcase #673
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#673
Loading…
Reference in a new issue
No description provided.
Delete branch "acid-ant/frostfs-node:bugfix/656-add-test-notfound"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #656
Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com
@ -41,3 +32,1 @@
zap.Stringer("cid", idCnr),
zap.Stringer("oid", idObj),
zap.String("error", err.Error()))
errFromBuryFn := p.buryFn(ctx, addrWithType.Address)
Why did you rename the error?
To keep error from
p.cnrSrc.Get(idCnr)
.I don't understand -- it is not used in this branch.
See your point, revert these changes.
@ -247,2 +248,3 @@
p.processObject(context.Background(), addrWithType)
err := p.processObject(context.Background(), addrWithType)
require.Nil(t, err)
require.NoError
?Updated.
@ -257,0 +278,4 @@
}
err := p.processObject(context.Background(), addrWithType)
require.True(t, client.IsErrContainerNotFound(err))
Fine, but we still don't check whether
buryFn
was called this way -- we could easily call it and return an error.Agree, I added a few lines to test
buryFn
.aedf932266
to41cff79351
41cff79351
toa51519654f
Thanks!
@ -257,0 +296,4 @@
WithBuryFunc(buryFn),
)
require.ErrorIs(t, p.processObject(context.Background(), addrWithType), fromBury)
That is useful, but not what I meant (I believe we already test this in a neighbour test.
In the first test we check the error, but do not check whether
buryFn
was called. It could be called, we must ensure it was not.Gotcha, added
buryFn
ininit
, removed redundant test.a51519654f
toe2dc220b60
e2dc220b60
to9f4effc74f