From f14e079edf1c0f8e62786276235af8cd928f037f Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Wed, 15 May 2019 08:20:06 -0700 Subject: [PATCH] f --- api/client.go | 8 -------- api/client_test.go | 2 -- api/prometheus/v1/api_test.go | 5 ++--- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/api/client.go b/api/client.go index f9174dd46..719c605fb 100644 --- a/api/client.go +++ b/api/client.go @@ -16,7 +16,6 @@ package api import ( "context" - "fmt" "io/ioutil" "net" "net/http" @@ -43,13 +42,6 @@ func (w *ErrorAPI) Err() error { } func (w *ErrorAPI) Error() string { - if w == nil { - fmt.Println("w nil") - } else { - if w.err == nil { - fmt.Println("w err nil") - } - } return w.err.Error() } diff --git a/api/client_test.go b/api/client_test.go index 9e8e8a1a5..7877e6a99 100644 --- a/api/client_test.go +++ b/api/client_test.go @@ -16,7 +16,6 @@ package api import ( "context" "encoding/json" - "fmt" "net/http" "net/http/httptest" "net/url" @@ -155,7 +154,6 @@ func TestDoGetFallback(t *testing.T) { // Do a post, and ensure that the post succeeds. _, b, err := DoGetFallback(client, context.TODO(), u, v) if err != nil { - fmt.Println(err) t.Fatalf("Error doing local request: %v", err) } resp := &testResponse{} diff --git a/api/prometheus/v1/api_test.go b/api/prometheus/v1/api_test.go index 140ccbc73..91b12dfd1 100644 --- a/api/prometheus/v1/api_test.go +++ b/api/prometheus/v1/api_test.go @@ -27,6 +27,7 @@ import ( "github.com/prometheus/client_golang/api" "github.com/prometheus/common/model" + "github.com/prometheus/tsdb/testutil" ) type apiTest struct { @@ -883,9 +884,7 @@ func TestAPIClientDo(t *testing.T) { } if test.expectedWarnings != nil { - if !reflect.DeepEqual(test.expectedWarnings, err.Warnings()) { - t.Errorf("expected warnings %v, actual=%v", test.expectedWarnings, err.Warnings()) - } + testutil.Equals(t, test.expectedWarnings, err.Warnings(), "expected warnings %v, actual=%v", test.expectedWarnings, err.Warnings()) } else { if err.Warnings() != nil { t.Errorf("Unexpected warnings: %v", err.Warnings())