frostfs-node/pkg/services/policer/check_test.go
Alex Vanin 20de74a505 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 16:38:26 +03:00

24 lines
542 B
Go

package policer
import (
"testing"
netmaptest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/netmap/test"
"github.com/stretchr/testify/require"
)
func TestNodeCache(t *testing.T) {
cache := newNodeCache()
node := netmaptest.NodeInfo()
require.Negative(t, cache.processStatus(node))
cache.SubmitSuccessfulReplication(node)
require.Zero(t, cache.processStatus(node))
cache.submitReplicaCandidate(node)
require.Positive(t, cache.processStatus(node))
cache.submitReplicaHolder(node)
require.Zero(t, cache.processStatus(node))
}