28 lines
500 B
Go
28 lines
500 B
Go
package cassandra
|
|
|
|
import (
|
|
"encoding/json"
|
|
"testing"
|
|
|
|
ocmsc "git.loafle.net/overflow/commons-go/model/sensorconfig"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestMatch(t *testing.T) {
|
|
config := &ocmsc.SensorConfig{}
|
|
config.Target = &ocmsc.Target{}
|
|
config.Target.Connection = &ocmsc.Connection{
|
|
IP: "192.168.1.104",
|
|
Port: json.Number(9042),
|
|
PortType: "tcp",
|
|
SSL: false,
|
|
}
|
|
|
|
c := NewCrawler()
|
|
|
|
rss, err := c.Get(config)
|
|
|
|
assert.Nil(t, err)
|
|
assert.NotNil(t, rss)
|
|
}
|