diff --git a/receiver/snmpreceiver/client_test.go b/receiver/snmpreceiver/client_test.go index 8cfb26ad1f09..5bc38d09ad29 100644 --- a/receiver/snmpreceiver/client_test.go +++ b/receiver/snmpreceiver/client_test.go @@ -8,7 +8,6 @@ import ( "fmt" "math" "strconv" - "strings" "testing" "github.com/gosnmp/gosnmp" @@ -83,9 +82,9 @@ func TestNewClient(t *testing.T) { func compareConfigToClient(t *testing.T, client *snmpClient, cfg *Config) { t.Helper() - require.True(t, strings.Contains(cfg.Endpoint, client.client.GetTarget())) - require.True(t, strings.Contains(cfg.Endpoint, strconv.FormatInt(int64(client.client.GetPort()), 10))) - require.True(t, strings.Contains(cfg.Endpoint, client.client.GetTransport())) + require.Contains(t, cfg.Endpoint, client.client.GetTarget()) + require.Contains(t, cfg.Endpoint, strconv.FormatInt(int64(client.client.GetPort()), 10)) + require.Contains(t, cfg.Endpoint, client.client.GetTransport()) switch cfg.Version { case "v1": require.Equal(t, gosnmp.Version1, client.client.GetVersion())