Skip to content

Commit

Permalink
Merge pull request #4355 from hashicorp/b-test-fixes
Browse files Browse the repository at this point in the history
 test fixes
  • Loading branch information
Preetha authored May 30, 2018
2 parents 93e7dc8 + 51a5b59 commit 4495ad9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
7 changes: 2 additions & 5 deletions 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
}

// no client, server resp
// client stats from server, should not error
{
c := s.client
s.client = nil
Expand All @@ -717,10 +717,7 @@ func TestHTTP_AllocAllGC(t *testing.T) {

respW := httptest.NewRecorder()
_, err = s.Server.ClientGCRequest(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
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 4495ad9

Please sign in to comment.