overflow_probe/discovery/communicate/communicator_test.go

27 lines
684 B
Go
Raw Permalink Normal View History

2017-08-03 10:08:34 +00:00
package communicate
2017-08-07 05:31:08 +00:00
//import (
// "bytes"
// "encoding/json"
//
// "git.loafle.net/overflow/overflow_probe/central/client/events"
// "git.loafle.net/overflow/overflow_probe/discovery/discovery/types/timestamp"
// "net/http"
// "testing"
//)
//
//func TestEventCollector(t *testing.T) {
// ev := events.Event{}
//
// ev.EventType = "install"
// ev.Time = timestamp.Now()
// ev.Collector_id = "1111111"
// ev.Data = events.CollectorInstallEvent{Version: "2.2"}
//
// bb, _ := json.Marshal(ev)
//
// //com := CompressTest(CompressDataGzip, UnCompressDataGzip, bb)
//
// http.Post("http://localhost:9090/_api/collector/event/status/install", "application/json", bytes.NewBuffer(bb))
//}