4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-28 19:39:24 +00:00

Fix tight loop (gitter). Closes #68.

This commit is contained in:
Wim
2016-11-02 16:12:43 +01:00
parent 8e606e3cef
commit 1b15897135
8 changed files with 76 additions and 30 deletions

View File

@ -1,30 +0,0 @@
package gitter
import (
"net/http"
"net/http/httptest"
"net/url"
)
var (
mux *http.ServeMux
gitter *Gitter
server *httptest.Server
)
func setup() {
mux = http.NewServeMux()
server = httptest.NewServer(mux)
gitter = New("abc")
// Fake the API and Stream base URLs by using the test
// server URL instead.
url, _ := url.Parse(server.URL)
gitter.config.apiBaseURL = url.String() + "/"
gitter.config.streamBaseURL = url.String() + "/"
}
func teardown() {
server.Close()
}