Skip to content

Commit

Permalink
consul: fixing test using wrong FSM
Browse files Browse the repository at this point in the history
  • Loading branch information
armon committed Jul 6, 2015
1 parent e37b5ec commit 2783f2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions consul/fsm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func TestFSM_SnapshotRestore(t *testing.T) {
}

// Verify key is set
_, d, err := fsm.state.KVSGet("/test")
_, d, err := fsm2.state.KVSGet("/test")
if err != nil {
t.Fatalf("err: %v", err)
}
Expand All @@ -427,7 +427,7 @@ func TestFSM_SnapshotRestore(t *testing.T) {
}

// Verify the index is restored
idx, _, err := fsm.state.KVSListKeys("/blah", "")
idx, _, err := fsm2.state.KVSListKeys("/blah", "")
if err != nil {
t.Fatalf("err: %v", err)
}
Expand All @@ -436,7 +436,7 @@ func TestFSM_SnapshotRestore(t *testing.T) {
}

// Verify session is restored
idx, s, err := fsm.state.SessionGet(session.ID)
idx, s, err := fsm2.state.SessionGet(session.ID)
if err != nil {
t.Fatalf("err: %v", err)
}
Expand All @@ -448,7 +448,7 @@ func TestFSM_SnapshotRestore(t *testing.T) {
}

// Verify ACL is restored
idx, a, err := fsm.state.ACLGet(acl.ID)
idx, a, err := fsm2.state.ACLGet(acl.ID)
if err != nil {
t.Fatalf("err: %v", err)
}
Expand All @@ -460,7 +460,7 @@ func TestFSM_SnapshotRestore(t *testing.T) {
}

// Verify tombstones are restored
_, res, err := fsm.state.tombstoneTable.Get("id", "/remove")
_, res, err := fsm2.state.tombstoneTable.Get("id", "/remove")
if err != nil {
t.Fatalf("err: %v", err)
}
Expand Down

0 comments on commit 2783f2b

Please sign in to comment.