Skip to content

Commit

Permalink
fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaeyo committed Sep 16, 2018
1 parent 07f664b commit 36fde3e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/inputs/ping/ping_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestHost(t *testing.T) {
assert.Equal(t, 52, max, "Max 52")
}

func mockHostPinger(timeout float64, args ...string) (string, error) {
func mockHostPinger(timeout float64, isV6 bool, args ...string) (string, error) {
return winENPingOutput, nil
}

Expand Down Expand Up @@ -102,7 +102,7 @@ Statystyka badania ping dla 195.187.242.157:
(100% straty),
`

func mockErrorHostPinger(timeout float64, args ...string) (string, error) {
func mockErrorHostPinger(timeout float64, isV6 bool, args ...string) (string, error) {
return errorPingOutput, errors.New("No packets received")
}

Expand Down Expand Up @@ -147,7 +147,7 @@ Szacunkowy czas błądzenia pakietów w millisekundach:
Minimum = 114 ms, Maksimum = 119 ms, Czas średni = 115 ms
`

func mockLossyHostPinger(timeout float64, args ...string) (string, error) {
func mockLossyHostPinger(timeout float64, isV6 bool, args ...string) (string, error) {
return lossyPingOutput, nil
}

Expand Down Expand Up @@ -207,7 +207,7 @@ Options:
`

func mockFatalHostPinger(timeout float64, args ...string) (string, error) {
func mockFatalHostPinger(timeout float64, isV6 bool, args ...string) (string, error) {
return fatalPingOutput, errors.New("So very bad")
}

Expand Down Expand Up @@ -249,7 +249,7 @@ Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),
`

func mockUnreachableHostPinger(timeout float64, args ...string) (string, error) {
func mockUnreachableHostPinger(timeout float64, isV6 bool, args ...string) (string, error) {
return UnreachablePingOutput, errors.New("So very bad")
}

Expand Down Expand Up @@ -298,7 +298,7 @@ Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),
`

func mockTTLExpiredPinger(timeout float64, args ...string) (string, error) {
func mockTTLExpiredPinger(timeout float64, isV6 bool, args ...string) (string, error) {
return TTLExpiredPingOutput, errors.New("So very bad")
}

Expand Down

0 comments on commit 36fde3e

Please sign in to comment.