mirror of https://github.com/prometheus/prometheus
use Fatalf instead of panic
parent
61d793cb1f
commit
0e58cda1fe
|
@ -15,7 +15,6 @@ package web
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
|
@ -111,7 +110,7 @@ func TestReadyAndHealthy(t *testing.T) {
|
||||||
go func() {
|
go func() {
|
||||||
err := webHandler.Run(context.Background())
|
err := webHandler.Run(context.Background())
|
||||||
if err != nil {
|
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() {
|
go func() {
|
||||||
err := webHandler.Run(context.Background())
|
err := webHandler.Run(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("Can't start web handler:%s", err))
|
t.Fatalf("Can't start web handler:%s", err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue