Skip to content

Commit

Permalink
Fix failing test TestClientStatusRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
Preetha Appan committed May 30, 2018
1 parent 6b19259 commit 51a5b59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion command/agent/alloc_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ func TestHTTP_AllocAllGC(t *testing.T) {
s.server = srv
}

// client GC from server, should not error
// client stats from server, should not error
{
c := s.client
s.client = nil
Expand Down
8 changes: 2 additions & 6 deletions command/agent/stats_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestClientStatsRequest(t *testing.T) {
}
}

// Local node, server resp
// client stats from server, should not error
{
srv := s.server
s.server = nil
Expand Down Expand Up @@ -70,11 +70,7 @@ func TestClientStatsRequest(t *testing.T) {

respW := httptest.NewRecorder()
_, err = s.Server.ClientStatsRequest(respW, req)
require.NotNil(err)

// The dev agent uses in-mem RPC so just assert the no route error
require.Contains(err.Error(), structs.ErrNoNodeConn.Error())

require.Nil(err)
s.client = c
}
})
Expand Down

0 comments on commit 51a5b59

Please sign in to comment.