From 9b7c410b4113289a3a37e161725620c41fb116a4 Mon Sep 17 00:00:00 2001 From: alessio Date: Mon, 14 Aug 2017 22:23:59 +0200 Subject: [PATCH] server tests fixed --- server/main_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/main_test.go b/server/main_test.go index a5cc025..baf9a23 100644 --- a/server/main_test.go +++ b/server/main_test.go @@ -19,6 +19,9 @@ func TestServer_Start(t *testing.T) { Settings: &s, } err := server.Start(nil) + if err != nil{ + t.Fatal(err) + } host := "http://localhost:5000/" urls := []string{ host, @@ -40,8 +43,8 @@ func TestServer_Start(t *testing.T) { host+"assets/img/svg/ic_swap_vertical_circle_black_48px.svg", } for _, elm := range urls { - _, err = http.Get(elm) - if err != nil { + resp, err := http.Get(elm) + if err != nil || resp.StatusCode != 200 { t.Fatal(err) } }