probe/service/SensorService_test.go

19 lines
634 B
Go
Raw Normal View History

2018-07-02 08:44:53 +00:00
package service
import (
"testing"
"fmt"
)
func TestSensorService_AddSensor(t *testing.T) {
2018-07-02 12:22:45 +00:00
config := "pT1QAThXECRfY+Vqe0PpaDrI5TlJ+Psf0AyM5JWiHlHHEr0oZsq8z5L01BnXV4LDHtMXGB0wDb2+L+4SDxk/zM57b7dGHt76ibmZ/R6jPXF8EZYgORbNcyy+m60sesk8fK23unH4Wc1Gqf5ekxTyYjupQ6ZSQbmdFk/WJM3iYy20G8JN3gsHHZtWVCDRVzhQU8sAg+UQ4voSlN3hWajAN8sZFL0HDSba7CjDX3rp9Z7K7VoZCkBsti9b7Z/WhFjHV23zoO786ZhKc8M8lYa69eCgcDDX4zYGJ5RUHnzLFwYkZ6GAoVX0NM8nCA8+yk59CbEcWS1qjR9Xv2C32PuZq8oWOhVW1xiXQDBD1hhAv+3c+m4gZmpHZQ=="
2018-07-02 08:44:53 +00:00
s := &SensorService{}
2018-07-03 07:25:26 +00:00
sc := &SensorConfigService{}
sc.InitService()
2018-07-02 08:44:53 +00:00
err := s.AddSensor(config)
if nil != err {
fmt.Errorf(err.Error())
}
}