container_network/crawler/health/smb/SMBHealthCrawler_test.go

27 lines
492 B
Go
Raw Permalink Normal View History

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