Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Sep 22, 2017
1 parent 465c4bb commit 68579d7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions agent/status_endpoint_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package agent

import (
"net/http"
"testing"
)

Expand All @@ -9,7 +10,8 @@ func TestStatusLeader(t *testing.T) {
a := NewTestAgent(t.Name(), nil)
defer a.Shutdown()

obj, err := a.srv.StatusLeader(nil, nil)
req, _ := http.NewRequest("GET", "/v1/status/leader", nil)
obj, err := a.srv.StatusLeader(nil, req)
if err != nil {
t.Fatalf("Err: %v", err)
}
Expand All @@ -24,7 +26,8 @@ func TestStatusPeers(t *testing.T) {
a := NewTestAgent(t.Name(), nil)
defer a.Shutdown()

obj, err := a.srv.StatusPeers(nil, nil)
req, _ := http.NewRequest("GET", "/v1/status/peers", nil)
obj, err := a.srv.StatusPeers(nil, req)
if err != nil {
t.Fatalf("Err: %v", err)
}
Expand Down

0 comments on commit 68579d7

Please sign in to comment.