Skip to content

Commit

Permalink
one more test case, but unexpected result :-(
Browse files Browse the repository at this point in the history
  • Loading branch information
sio4 committed Apr 29, 2022
1 parent a8f53c6 commit 2fc48c4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions exporters/stackdriver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package exporters

import (
"context"
"net"
"sync"
"testing"

"github.com/hyeoncheon/bogo"
"github.com/hyeoncheon/bogo/internal/common"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -63,3 +65,21 @@ func TestStackdriverRunner_OnGCE(t *testing.T) {
r.Error(stackdriverRunner(c, o, c.Channel()))
c.Cancel()
}

func TestRecordPingMessage(t *testing.T) {
r := require.New(t)
r.NoError(recordPingMessage(&reporter{
instanceName: "instance",
externalIP: "ipaddress",
zone: "here",
}, &bogo.PingMessage{
Addr: "localhost",
IPAddr: &net.IPAddr{},
Count: 10,
Loss: 10,
MinRtt: 10,
MaxRtt: 10,
AvgRtt: 10,
StdDev: 10,
}))
}

0 comments on commit 2fc48c4

Please sign in to comment.