probe/ping/ping_test.go
2018-08-15 15:18:40 +09:00

27 lines
366 B
Go

package ping
import (
"testing"
)
func TestPing(t *testing.T) {
ip := "192.168.1.229"
port := 6379
portType := "TCP"
key := "REDIS"
tls := false
ch := make(chan *Res)
Ping(ch, ip, port, tls, portType, key)
for res := range ch {
if res.Error != nil {
t.Error(res.Error)
} else {
t.Log(res.Matcher.Name())
t.Log(res.Matcher.Meta())
}
}
}