Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksontj committed May 15, 2019
1 parent 5d404dc commit f14e079
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
8 changes: 0 additions & 8 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package api

import (
"context"
"fmt"
"io/ioutil"
"net"
"net/http"
Expand All @@ -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()
}

Expand Down
2 changes: 0 additions & 2 deletions api/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package api
import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
"net/url"
Expand Down Expand Up @@ -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{}
Expand Down
5 changes: 2 additions & 3 deletions api/prometheus/v1/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

"github.com/prometheus/client_golang/api"
"github.com/prometheus/common/model"
"github.com/prometheus/tsdb/testutil"
)

type apiTest struct {
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit f14e079

Please sign in to comment.