Skip to content

Commit

Permalink
edgexfoundry#196: Explicitly ignored unused values.
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Forster <me@brandonforster.com>
  • Loading branch information
brandonforster committed Jan 30, 2020
1 parent 8bd808f commit c3a892f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions clients/scheduler/interval_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestIntervalActionRestClient_IntervalAction(t *testing.T) {
if err != nil {
t.Fatalf("marshaling error: %s", err.Error())
}
w.Write(data)
_, _ = w.Write(data)
}))

badJSONServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -175,7 +175,7 @@ func TestIntervalActionRestClient_IntervalAction(t *testing.T) {
t.Fatalf("expected uri path is %s, actual uri path is %s", expectedURL, r.URL.EscapedPath())
}

w.Write([]byte{1, 2, 3, 4})
_, _ = w.Write([]byte{1, 2, 3, 4})
}))

defer ts.Close()
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestIntervalActionRestClient_IntervalActionForName(t *testing.T) {
if err != nil {
t.Fatalf("marshaling error: %s", err.Error())
}
w.Write(data)
_, _ = w.Write(data)
}))

defer ts.Close()
Expand Down Expand Up @@ -297,7 +297,7 @@ func TestIntervalActionRestClient_IntervalActions(t *testing.T) {
if err != nil {
t.Fatalf("marshaling error: %s", err.Error())
}
w.Write(data)
_, _ = w.Write(data)
}))

badJSONServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -312,7 +312,7 @@ func TestIntervalActionRestClient_IntervalActions(t *testing.T) {
t.Fatalf("expected uri path is %s, actual uri path is %s", expectedURL, r.URL.EscapedPath())
}

w.Write([]byte{1, 2, 3, 4})
_, _ = w.Write([]byte{1, 2, 3, 4})
}))

defer ts.Close()
Expand Down Expand Up @@ -389,7 +389,7 @@ func TestIntervalActionRestClient_IntervalActionsForTargetByName(t *testing.T) {
if err != nil {
t.Fatalf("marshaling error: %s", err.Error())
}
w.Write(data)
_, _ = w.Write(data)
}))

defer ts.Close()
Expand Down
14 changes: 7 additions & 7 deletions clients/scheduler/interval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func TestIntervalRestClient_Interval(t *testing.T) {
if err != nil {
t.Fatalf("marshaling error: %s", err.Error())
}
w.Write(data)
_, _ = w.Write(data)
}))

badJSONServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -188,7 +188,7 @@ func TestIntervalRestClient_Interval(t *testing.T) {
t.Fatalf("expected uri path is %s, actual uri path is %s", expectedURL, r.URL.EscapedPath())
}

w.Write([]byte{1, 2, 3, 4})
_, _ = w.Write([]byte{1, 2, 3, 4})
}))

defer ts.Close()
Expand Down Expand Up @@ -267,7 +267,7 @@ func TestIntervalRestClient_IntervalForName(t *testing.T) {
if err != nil {
t.Fatalf("marshaling error: %s", err.Error())
}
w.Write(data)
_, _ = w.Write(data)
}))

defer ts.Close()
Expand Down Expand Up @@ -310,7 +310,7 @@ func TestIntervalRestClient_Intervals(t *testing.T) {
if err != nil {
t.Fatalf("marshaling error: %s", err.Error())
}
w.Write(data)
_, _ = w.Write(data)
}))

badJSONServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -325,7 +325,7 @@ func TestIntervalRestClient_Intervals(t *testing.T) {
t.Fatalf("expected uri path is %s, actual uri path is %s", expectedURL, r.URL.EscapedPath())
}

w.Write([]byte{1, 2, 3, 4})
_, _ = w.Write([]byte{1, 2, 3, 4})
}))

defer ts.Close()
Expand Down Expand Up @@ -410,7 +410,7 @@ func TestIntervalRestClient_Update(t *testing.T) {
type MockEndpoint struct {
}

func (e MockEndpoint) Monitor(params types.EndpointParams) chan string {
func (e MockEndpoint) Monitor(_ types.EndpointParams) chan string {
return make(chan string, 1)
}

Expand All @@ -420,7 +420,7 @@ func testHttpServer(t *testing.T, matchingRequestMethod string, matchingRequestU
w.WriteHeader(http.StatusOK)

if r.Method == matchingRequestMethod && r.RequestURI == matchingRequestUri {
w.Write([]byte("Ok"))
_, _ = w.Write([]byte("Ok"))
} else if r.Method != matchingRequestMethod {
t.Fatalf("expected method %s to be invoked by client, %s invoked", matchingRequestMethod, r.Method)
} else if r.RequestURI == matchingRequestUri {
Expand Down

0 comments on commit c3a892f

Please sign in to comment.