mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
Updated tests and comments
This commit is contained in:
@@ -129,7 +129,7 @@ func (s *HTTPServer) registerHandlers(enableDebug bool) {
|
||||
s.mux.HandleFunc("/v1/status/peers", s.wrap(s.StatusPeersRequest))
|
||||
|
||||
s.mux.HandleFunc("/v1/system/gc", s.wrap(s.GarbageCollectRequest))
|
||||
s.mux.HandleFunc("/v1/system/reconcilesummaries", s.wrap(s.ReconcileJobSummaries))
|
||||
s.mux.HandleFunc("/v1/system/reconcile/summaries", s.wrap(s.ReconcileJobSummaries))
|
||||
|
||||
if enableDebug {
|
||||
s.mux.HandleFunc("/debug/pprof/", pprof.Index)
|
||||
|
||||
@@ -25,7 +25,7 @@ func TestHTTP_SystemGarbageCollect(t *testing.T) {
|
||||
func TestHTTP_ReconcileJobSummaries(t *testing.T) {
|
||||
httpTest(t, nil, func(s *TestServer) {
|
||||
// Make the HTTP request
|
||||
req, err := http.NewRequest("PUT", "/v1/system/reconcilesummaries", nil)
|
||||
req, err := http.NewRequest("PUT", "/v1/system/reconcile/summaries", nil)
|
||||
if err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
@@ -35,7 +35,6 @@ func TestHTTP_ReconcileJobSummaries(t *testing.T) {
|
||||
if _, err := s.Server.ReconcileJobSummaries(respW, req); err != nil {
|
||||
t.Fatalf("err: %v", err)
|
||||
}
|
||||
t.Fatalf("code %v", respW.Code)
|
||||
|
||||
if respW.Code != 200 {
|
||||
t.Fatalf("expected: %v, actual: %v", 200, respW.Code)
|
||||
|
||||
Reference in New Issue
Block a user