Skip to content

Commit

Permalink
node/policy: Drop unit test duplicate
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Jul 11, 2024
1 parent 4f90cc2 commit d68aa9f
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions cmd/neofs-node/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,26 +161,6 @@ func TestContainerNodes_ForEachContainerNodePublicKeyInLastTwoEpochs(t *testing.
require.Contains(t, calledKeys, nodes[3].PublicKey())
})

t.Run("zero current epoch", func(t *testing.T) {
nodes, curNetmap, cnr := newNetmapWithContainer(t, 5, []int{1, 3})

ns, err := newContainerNodes(&testContainer{id: anyCnr, val: cnr}, &testNetwork{
epoch: 0,
curNetmap: curNetmap,
})
require.NoError(t, err)

var calledKeys [][]byte
err = ns.forEachContainerNodePublicKeyInLastTwoEpochs(anyCnr, func(pubKey []byte) bool {
calledKeys = append(calledKeys, pubKey)
return true
})
require.NoError(t, err)
require.Len(t, calledKeys, 2)
require.Contains(t, calledKeys, nodes[1].PublicKey())
require.Contains(t, calledKeys, nodes[3].PublicKey())
})

t.Run("read previous network map failure", func(t *testing.T) {
nodes, curNetmap, cnr := newNetmapWithContainer(t, 5, []int{1, 3})
prevNetmapErr := errors.New("any previous netmap error")
Expand Down

0 comments on commit d68aa9f

Please sign in to comment.