Use panic in goroutine in test, not t.Fatalf

This commit is contained in:
Brian Brazil 2017-10-09 16:47:31 +01:00
parent 37ec2d5283
commit 8740fcc657
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ package web
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
@ -233,7 +234,7 @@ func TestRoutePrefix(t *testing.T) {
go func() {
err := webHandler.Run(context.Background())
if err != nil {
t.Fatalf("Can't start webhandler error %s", err)
panic(fmt.Sprintf("Can't start webhandler error %s", err))
}
}()