Fix failing test TestClientStatusRequest

This commit is contained in:
Preetha Appan
2018-05-30 14:45:10 -05:00
parent 6b192593a1
commit 51a5b592c5
2 changed files with 3 additions and 7 deletions

View File

@@ -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

View File

@@ -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
@@ -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
}
})