22 lines
349 B
Go
22 lines
349 B
Go
package collector_go
|
|
|
|
import (
|
|
"log"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestCallGet(t *testing.T) {
|
|
c := Collector{}
|
|
c.Start()
|
|
time.Sleep(time.Second * 10)
|
|
|
|
log.Println("add sensor")
|
|
c.AddSensor("/network/smb/t2.conf")
|
|
time.Sleep(time.Second * 3)
|
|
|
|
log.Println("update sonsor")
|
|
c.UpdateSensor("/network/smb/t1.conf")
|
|
time.Sleep(time.Second * 20)
|
|
}
|