Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f5037e1c22
|
@ -58,6 +58,8 @@ func TestSend(t *testing.T) {
|
||||||
|
|
||||||
func TestRealSendByGin(t *testing.T) {
|
func TestRealSendByGin(t *testing.T) {
|
||||||
|
|
||||||
|
SetRootURL("http://localhost:8080")
|
||||||
|
|
||||||
e := events.NewEvent(events.CENTRAL_EVENT, events.NewInstallEvent("TestInstallEvent"))
|
e := events.NewEvent(events.CENTRAL_EVENT, events.NewInstallEvent("TestInstallEvent"))
|
||||||
data, _ := json.Marshal(&e)
|
data, _ := json.Marshal(&e)
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ func (c *communicator) start() {
|
||||||
go func(event *events.Event) {
|
go func(event *events.Event) {
|
||||||
m := event.Data.(events.URLMaker)
|
m := event.Data.(events.URLMaker)
|
||||||
data, _ := json.Marshal(event)
|
data, _ := json.Marshal(event)
|
||||||
r, _ := http.Post(m.GetUrl(), "application/json", bytes.NewBuffer(data))
|
r, _ := http.Post(c.RootURL+m.GetUrl(), "application/json", bytes.NewBuffer(data))
|
||||||
e.Result <- events.Result{Message: r.Status}
|
e.Result <- events.Result{Message: r.Status}
|
||||||
}(e)
|
}(e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user