Skip to content

Commit

Permalink
Fix linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
miry committed Sep 12, 2022
1 parent 605706e commit 7a2d222
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 0 additions & 5 deletions api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ func WithServer(t *testing.T, f func(string)) {

// Make sure only one server is running at a time. Apparently there's no clean
// way to shut it down between each test run.
logger := zerolog.Nop()
if _, ok := os.LookupEnv("DEBUG"); ok {
logger = zerolog.New(os.Stdout).With().Caller().Timestamp().Logger()
}

if testServer == nil {
testServer = toxiproxy.NewServer(
toxiproxy.NewMetricsContainer(prometheus.NewRegistry()),
Expand Down
6 changes: 5 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,11 @@ func (c *Client) validateResponse(resp *http.Response, expectedCode int) error {

err = json.Unmarshal(result, apiError)
if err != nil {
apiError.Message = fmt.Sprintf("Unexpected response code %d, expected %d", resp.StatusCode, expectedCode)
apiError.Message = fmt.Sprintf(
"Unexpected response code %d, expected %d",
resp.StatusCode,
expectedCode,
)
apiError.Status = resp.StatusCode
}
return apiError
Expand Down
3 changes: 2 additions & 1 deletion client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
// t.Run(tc.name, func(t *testing.T) {
// t.Parallel()
//
// server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// server := httptest.NewServer(
// http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// w.WriteHeader(http.StatusOK)
// }))
// defer server.Close()
Expand Down

0 comments on commit 7a2d222

Please sign in to comment.