From 0e58cda1fe5b5a4b8501f239faff2eaff53a999f Mon Sep 17 00:00:00 2001 From: Krasi Georgiev Date: Tue, 19 Dec 2017 12:02:34 +0000 Subject: [PATCH] use Fatalf instead of panic --- web/web_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/web_test.go b/web/web_test.go index 656814c37..10f3d83f9 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -15,7 +15,6 @@ package web import ( "context" - "fmt" "io/ioutil" "net/http" "net/http/httptest" @@ -111,7 +110,7 @@ func TestReadyAndHealthy(t *testing.T) { go func() { err := webHandler.Run(context.Background()) if err != nil { - panic(fmt.Sprintf("Can't start web handler:%s", err)) + t.Fatalf("Can't start web handler:%s", err) } }() @@ -207,7 +206,7 @@ func TestRoutePrefix(t *testing.T) { go func() { err := webHandler.Run(context.Background()) if err != nil { - panic(fmt.Sprintf("Can't start web handler:%s", err)) + t.Fatalf("Can't start web handler:%s", err) } }()