Add InitValidate method for setup

This commit is contained in:
Ethan Frey
2017-08-03 21:41:23 +02:00
parent 4b69f1d5ba
commit 37550ca91d
22 changed files with 164 additions and 39 deletions
+2 -2
View File
@@ -32,12 +32,12 @@ func makeState() state.SimpleDB {
func TestCheckpointer(t *testing.T) {
assert, require := assert.New(t), require.New(t)
good := writerHand{"foo", []byte{1, 2}, []byte("bar")}
good := writerHand{name: "foo", key: []byte{1, 2}, value: []byte("bar")}
bad := FailHandler{Err: errors.New("no go")}
app := New(
Checkpoint{OnCheck: true},
writerMid{"bing", []byte{1, 2}, []byte("bang")},
writerMid{name: "bing", key: []byte{1, 2}, value: []byte("bang")},
Checkpoint{OnDeliver: true},
).Use(
NewDispatcher(