*: init for on disk snap support

This commit is contained in:
Xiang Li
2014-09-16 18:18:45 -07:00
parent f17391a72b
commit ab61a8aa9a
11 changed files with 359 additions and 104 deletions

View File

@ -28,10 +28,10 @@ func TestSet(t *testing.T) {
n.Campaign(ctx)
srv := &etcdserver.EtcdServer{
Store: store.New(),
Node: n,
Save: func(st raftpb.HardState, ents []raftpb.Entry) {},
Send: etcdserver.SendFunc(nopSend),
Store: store.New(),
Node: n,
Storage: nopStorage{},
Send: etcdserver.SendFunc(nopSend),
}
srv.Start()
defer srv.Stop()
@ -66,3 +66,9 @@ func TestSet(t *testing.T) {
}
func stringp(s string) *string { return &s }
type nopStorage struct{}
func (np nopStorage) Save(st raftpb.HardState, ents []raftpb.Entry) {}
func (np nopStorage) Cut() error { return nil }
func (np nopStorage) SaveSnap(st raftpb.Snapshot) {}