mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Fix failing test TestClientStatusRequest
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user