probe/snmp/snmp_test.go

24 lines
384 B
Go
Raw Normal View History

2018-08-15 06:18:40 +00:00
package snmp
import (
"testing"
2018-08-16 09:05:21 +00:00
omd "git.loafle.net/overflow/model/discovery"
omm "git.loafle.net/overflow/model/meta"
)
2018-08-15 06:18:40 +00:00
2018-08-16 09:05:21 +00:00
func TestSNMPScan(t *testing.T) {
host := &omd.Host{
MetaIPType: omm.ToMetaIPType(omm.MetaIPTypeEnumV4),
Address: "192.168.1.229",
2018-08-15 06:18:40 +00:00
}
2018-08-16 09:05:21 +00:00
ch := make(chan *SNMPResponse)
defer close(ch)
ScanSNMP(host, "test1252serc", ch)
2018-08-15 06:18:40 +00:00
2018-08-16 09:05:21 +00:00
msg := <-ch
t.Log(msg)
2018-08-15 06:18:40 +00:00
}