From c7e38815281813e67193264bbad684760e4f111e Mon Sep 17 00:00:00 2001 From: jackdaw Date: Mon, 28 Nov 2016 14:44:24 +0900 Subject: [PATCH] . --- communicate_test.go | 2 ++ communicator.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/communicate_test.go b/communicate_test.go index 38d3d42..c41df63 100644 --- a/communicate_test.go +++ b/communicate_test.go @@ -58,6 +58,8 @@ func TestSend(t *testing.T) { func TestRealSendByGin(t *testing.T) { + SetRootURL("http://localhost:8080") + e := events.NewEvent(events.CENTRAL_EVENT, events.NewInstallEvent("TestInstallEvent")) data, _ := json.Marshal(&e) diff --git a/communicator.go b/communicator.go index b4c4832..80cf32b 100644 --- a/communicator.go +++ b/communicator.go @@ -26,7 +26,7 @@ func (c *communicator) start() { go func(event *events.Event) { m := event.Data.(events.URLMaker) 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) }