server tests fixed
This commit is contained in:
parent
a841339b72
commit
9b7c410b41
|
@ -19,6 +19,9 @@ func TestServer_Start(t *testing.T) {
|
||||||
Settings: &s,
|
Settings: &s,
|
||||||
}
|
}
|
||||||
err := server.Start(nil)
|
err := server.Start(nil)
|
||||||
|
if err != nil{
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
host := "http://localhost:5000/"
|
host := "http://localhost:5000/"
|
||||||
urls := []string{
|
urls := []string{
|
||||||
host,
|
host,
|
||||||
|
@ -40,8 +43,8 @@ func TestServer_Start(t *testing.T) {
|
||||||
host+"assets/img/svg/ic_swap_vertical_circle_black_48px.svg",
|
host+"assets/img/svg/ic_swap_vertical_circle_black_48px.svg",
|
||||||
}
|
}
|
||||||
for _, elm := range urls {
|
for _, elm := range urls {
|
||||||
_, err = http.Get(elm)
|
resp, err := http.Get(elm)
|
||||||
if err != nil {
|
if err != nil || resp.StatusCode != 200 {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue