package ssh import ( "testing" "git.loafle.net/overflow/commons-go/model/meta" ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig" "github.com/stretchr/testify/assert" ) func TestMatch(t *testing.T) { config := &ocmsc.SensorConfig{} config.Connection = &ocmsc.SensorConfigConnection{ MetaIPTypeKey: "V4", IP: "192.168.1.103", MetaPortTypeKey: "TCP", Port: "22", MetaCryptoTypeKey: "SSL", } metaCollectionItem := &meta.MetaCollectionItem{ Key: "service.health.response_time", } config.MetaCollectionItems = make([]*meta.MetaCollectionItem, 1) config.MetaCollectionItems[0] = metaCollectionItem c := NewCrawler() rss, err := c.Get(config) if err != nil { t.Log(err.Error()) } assert.NotNil(t, rss) }