mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 19:42:20 +00:00
Fix statistics test
This commit is contained in:
parent
392a9d7fc3
commit
ee13d9f0e9
@ -31,7 +31,7 @@ func TestViewerPageGET(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Test GET request on statistics page
|
// Test GET request on statistics page
|
||||||
r, _ = http.NewRequest("GET", "/", nil)
|
r, _ = http.NewRequest("GET", "/_stats/demo/", nil)
|
||||||
w = httptest.NewRecorder()
|
w = httptest.NewRecorder()
|
||||||
http.HandlerFunc(statisticsHandler).ServeHTTP(w, r)
|
http.HandlerFunc(statisticsHandler).ServeHTTP(w, r)
|
||||||
if w.Code != http.StatusOK {
|
if w.Code != http.StatusOK {
|
||||||
|
@ -43,7 +43,7 @@ func TestHTTPServe(t *testing.T) {
|
|||||||
t.Errorf("Viewer page returned %v != %v on GET", resp.StatusCode, http.StatusOK)
|
t.Errorf("Viewer page returned %v != %v on GET", resp.StatusCode, http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err = http.Get("http://localhost:8081/_stats")
|
resp, err = http.Get("http://localhost:8081/_stats/demo/")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error("Error while getting /_stats:", err)
|
t.Error("Error while getting /_stats:", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user