[#519] Use Address.Equals in policer tests
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Build / Build Components (1.19) (pull_request) Successful in 3m36s
Build / Build Components (1.20) (pull_request) Successful in 3m46s
Tests and linters / Lint (pull_request) Successful in 3m27s
Tests and linters / Tests (1.19) (pull_request) Successful in 5m15s
Tests and linters / Tests with -race (pull_request) Successful in 8m3s
Tests and linters / Staticcheck (pull_request) Successful in 22m53s
Tests and linters / Tests (1.20) (pull_request) Successful in 29m38s
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Build / Build Components (1.19) (pull_request) Successful in 3m36s
Build / Build Components (1.20) (pull_request) Successful in 3m46s
Tests and linters / Lint (pull_request) Successful in 3m27s
Tests and linters / Tests (1.19) (pull_request) Successful in 5m15s
Tests and linters / Tests with -race (pull_request) Successful in 8m3s
Tests and linters / Staticcheck (pull_request) Successful in 22m53s
Tests and linters / Tests (1.20) (pull_request) Successful in 29m38s
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
8a9fc2c372
commit
9d70ab2488
1 changed files with 2 additions and 7 deletions
|
@ -220,11 +220,11 @@ func TestProcessObject(t *testing.T) {
|
|||
WithRemoteObjectHeaderFunc(headFn),
|
||||
WithBuryFunc(buryFn),
|
||||
WithRedundantCopyCallback(func(_ context.Context, a oid.Address) {
|
||||
require.True(t, eqAddr(a, addr), "unexpected redundant copy callback: a=%v", a)
|
||||
require.True(t, a.Equals(addr), "unexpected redundant copy callback: a=%v", a)
|
||||
gotRemoveRedundant = true
|
||||
}),
|
||||
WithReplicator(replicatorFunc(func(_ context.Context, task replicator.Task, res replicator.TaskResult) {
|
||||
require.True(t, eqAddr(task.Addr, addr), "unexpected replicator task: %+v", task)
|
||||
require.True(t, task.Addr.Equals(addr), "unexpected replicator task: %+v", task)
|
||||
for _, node := range task.Nodes {
|
||||
gotReplicateTo = append(gotReplicateTo, int(node.PublicKey()[0]))
|
||||
}
|
||||
|
@ -303,11 +303,6 @@ func TestIteratorContract(t *testing.T) {
|
|||
}, it.calls)
|
||||
}
|
||||
|
||||
// TODO(https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/issues/101)
|
||||
func eqAddr(a, b oid.Address) bool {
|
||||
return a.Container().Equals(b.Container()) && a.Object().Equals(b.Object())
|
||||
}
|
||||
|
||||
type nextResult struct {
|
||||
objs []objectcore.AddressWithType
|
||||
err error
|
||||
|
|
Loading…
Reference in a new issue