csi-addons: address golangci-lint issues

addressed golangci-lint issues in csi-addons
code.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2024-04-04 10:51:19 +02:00
committed by mergify[bot]
parent a362ef6bd4
commit 29a9114409
10 changed files with 48 additions and 41 deletions

View File

@ -19,7 +19,7 @@ package networkfence
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestGetIPRange(t *testing.T) {
@ -47,10 +47,10 @@ func TestGetIPRange(t *testing.T) {
t.Run(ts.cidr, func(t *testing.T) {
t.Parallel()
got, err := getIPRange(ts.cidr)
assert.NoError(t, err)
require.NoError(t, err)
// validate if number of IPs in the range is same as expected, if not, fail.
assert.ElementsMatch(t, ts.expectedIPs, got)
require.ElementsMatch(t, ts.expectedIPs, got)
})
}
}