agent: fix test

This commit is contained in:
Ryan Uber 2015-01-21 14:12:18 -08:00
parent 61322641ea
commit 5cd8800b60
1 changed files with 3 additions and 0 deletions

View File

@ -542,6 +542,9 @@ func TestHTTPAgent_ServiceMaintenanceEndpoint_BadRequest(t *testing.T) {
// Fails when bad service ID provided
req, _ = http.NewRequest("PUT", "/v1/agent/service/maintenance/_nope_?enable=true", nil)
resp = httptest.NewRecorder()
if _, err := srv.AgentServiceMaintenance(resp, req); err != nil {
t.Fatalf("err: %s", err)
}
if resp.Code != 404 {
t.Fatalf("expected 404, got %d", resp.Code)
}