Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test fixes #4355

Merged
merged 2 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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