forked from TrueCloudLab/frostfs-api-go
[#199] sdk/netmap: Correct linter's remarks
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
459d295788
commit
3a966ee5df
9 changed files with 69 additions and 37 deletions
|
@ -163,7 +163,10 @@ func TestPlacementPolicy_ProcessSelectorsHRW(t *testing.T) {
|
|||
c := NewContext(nm)
|
||||
c.setPivot([]byte("containerID"))
|
||||
c.weightFunc = newWeightFunc(newMaxNorm(10000), newReverseMinNorm(1))
|
||||
c.aggregator = newMaxAgg
|
||||
c.aggregator = func() aggregator {
|
||||
return new(maxAgg)
|
||||
}
|
||||
|
||||
require.NoError(t, c.processFilters(p))
|
||||
require.NoError(t, c.processSelectors(p))
|
||||
|
||||
|
@ -186,6 +189,10 @@ func TestPlacementPolicy_ProcessSelectorsHRW(t *testing.T) {
|
|||
require.Equal(t, res, cnt)
|
||||
}
|
||||
|
||||
func newMaxNorm(max float64) normalizer {
|
||||
return &maxNorm{max: max}
|
||||
}
|
||||
|
||||
func TestPlacementPolicy_ProcessSelectorsInvalid(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue