logical/framework: WAL entry supports "kind"

This commit is contained in:
Mitchell Hashimoto
2015-03-17 17:23:18 -07:00
parent e77f79b317
commit 93f828ec0d
4 changed files with 28 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ func TestWAL(t *testing.T) {
}
// Write an entry to the WAL
id, err := PutWAL(s, "bar")
id, err := PutWAL(s, "foo", "bar")
if err != nil {
t.Fatalf("err: %s", err)
}
@@ -35,10 +35,13 @@ func TestWAL(t *testing.T) {
}
// Should be able to get the value
v, err := GetWAL(s, id)
kind, v, err := GetWAL(s, id)
if err != nil {
t.Fatalf("err: %s", err)
}
if kind != "foo" {
t.Fatalf("bad: %#v", kind)
}
if v != "bar" {
t.Fatalf("bad: %#v", v)
}
@@ -47,7 +50,7 @@ func TestWAL(t *testing.T) {
if err := DeleteWAL(s, id); err != nil {
t.Fatalf("err: %s", err)
}
v, err = GetWAL(s, id)
_, v, err = GetWAL(s, id)
if err != nil {
t.Fatalf("err: %s", err)
}