container_network/crawler/health/snmp/v3/SNMPHealthCrawler_test.go

27 lines
487 B
Go
Raw Normal View History

2018-04-19 15:46:38 +00:00
package v3
import (
"encoding/json"
"testing"
ocsm "git.loafle.net/overflow/commons-go/sensorconfig/model"
"github.com/stretchr/testify/assert"
)
func TestMatch(t *testing.T) {
config := &ocsm.SensorConfig{}
config.Target = &ocsm.Target{}
config.Target.Connection = &ocsm.Connection{
IP: "192.168.1.254",
Port: json.Number(161),
PortType: "udp",
SSL: false,
}
c := NewCrawler()
rss, err := c.Get(config)
assert.Nil(t, err)
assert.NotNil(t, rss)
}