Merge pull request #1274 from influxdb/raft-prefix

Fix tests for /raft prefix
pull/1277/head
Ben Johnson 2014-12-30 12:00:23 -07:00
commit d626ea5b3d
1 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ func TestTransportMux_RequestVote_ErrUnsupportedScheme(t *testing.T) {
func TestHTTPTransport_Heartbeat(t *testing.T) {
// Start mock HTTP server.
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if path := r.URL.Path; path != `/heartbeat` {
if path := r.URL.Path; path != `/raft/heartbeat` {
t.Fatalf("unexpected path: %q", path)
}
if term := r.FormValue("term"); term != `1` {
@ -128,7 +128,7 @@ func TestHTTPTransport_Heartbeat_ErrConnectionRefused(t *testing.T) {
func TestHTTPTransport_ReadFrom(t *testing.T) {
// Start mock HTTP server.
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if path := r.URL.Path; path != `/stream` {
if path := r.URL.Path; path != `/raft/stream` {
t.Fatalf("unexpected path: %q", path)
}
if term := r.FormValue("id"); term != `1` {
@ -191,7 +191,7 @@ func TestHTTPTransport_ReadFrom_ErrConnectionRefused(t *testing.T) {
func TestHTTPTransport_RequestVote(t *testing.T) {
// Start mock HTTP server.
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if path := r.URL.Path; path != `/vote` {
if path := r.URL.Path; path != `/raft/vote` {
t.Fatalf("unexpected path: %s", path)
}
if term := r.FormValue("term"); term != `1` {