Skip to content

Commit 8d78c5f

Browse files
authored
chore(deps): Bump github.com/gosnmp/gosnmp from 1.34.0 to 1.35.0 (influxdata#12355)
1 parent 6b08068 commit 8d78c5f

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ require (
8585
github.com/gophercloud/gophercloud v1.0.0
8686
github.com/gorilla/mux v1.8.0
8787
github.com/gorilla/websocket v1.5.0
88-
github.com/gosnmp/gosnmp v1.34.0
88+
github.com/gosnmp/gosnmp v1.35.0
8989
github.com/grid-x/modbus v0.0.0-20211113184042-7f2251c342c9
9090
github.com/gwos/tcg/sdk v0.0.0-20220621192633-df0eac0a1a4c
9191
github.com/harlow/kinesis-consumer v0.3.6-0.20211204214318-c2b9f79d7ab6

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1327,8 +1327,8 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA
13271327
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
13281328
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
13291329
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
1330-
github.com/gosnmp/gosnmp v1.34.0 h1:p96iiNTTdL4ZYspPC3leSKXiHfE1NiIYffMu9100p5E=
1331-
github.com/gosnmp/gosnmp v1.34.0/go.mod h1:QWTRprXN9haHFof3P96XTDYc46boCGAh5IXp0DniEx4=
1330+
github.com/gosnmp/gosnmp v1.35.0 h1:EuWWNPxTCdAUx2/NbQcSa3WdNxjzpy4Phv57b4MWpJM=
1331+
github.com/gosnmp/gosnmp v1.35.0/go.mod h1:2AvKZ3n9aEl5TJEo/fFmf/FGO4Nj4cVeEc5yuk88CYc=
13321332
github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE=
13331333
github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE=
13341334
github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw=

plugins/inputs/snmp_trap/snmp_trap_test.go

+5-11
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ func newMsgFlagsV3(secLevel string) gosnmp.SnmpV3MsgFlags {
5050
default:
5151
msgFlags = gosnmp.NoAuthNoPriv
5252
}
53-
5453
return msgFlags
5554
}
5655

@@ -96,7 +95,7 @@ func newUsmSecurityParametersForV3(authProto string, privProto string, username
9695
}
9796

9897
return &gosnmp.UsmSecurityParameters{
99-
AuthoritativeEngineID: "1",
98+
AuthoritativeEngineID: "deadbeef", // has to be between 5 & 32 chars
10099
AuthoritativeEngineBoots: 1,
101100
AuthoritativeEngineTime: 1,
102101
UserName: username,
@@ -136,16 +135,11 @@ func newGoSNMP(version gosnmp.SnmpVersion, port uint16) gosnmp.GoSNMP {
136135
}
137136

138137
func sendTrap(t *testing.T, goSNMP gosnmp.GoSNMP, trap gosnmp.SnmpTrap) {
139-
err := goSNMP.Connect()
140-
if err != nil {
141-
t.Errorf("Connect() err: %v", err)
142-
}
138+
require.NoError(t, goSNMP.Connect())
143139
defer goSNMP.Conn.Close()
144140

145-
_, err = goSNMP.SendTrap(trap)
146-
if err != nil {
147-
t.Errorf("SendTrap() err: %v", err)
148-
}
141+
_, err := goSNMP.SendTrap(trap)
142+
require.NoError(t, err)
149143
}
150144

151145
func TestReceiveTrap(t *testing.T) {
@@ -1295,7 +1289,7 @@ func TestReceiveTrap(t *testing.T) {
12951289
s.translator = newTestTranslator(tt.entries)
12961290

12971291
var acc testutil.Accumulator
1298-
require.Nil(t, s.Start(&acc))
1292+
require.NoError(t, s.Start(&acc))
12991293
defer s.Stop()
13001294

13011295
var goSNMP gosnmp.GoSNMP

0 commit comments

Comments
 (0)