Explorar o código

Merge pull request #10263 from johncming/raftstorage

raft:  add a test case in TestStorageAppend
Xiang Li %!s(int64=7) %!d(string=hai) anos
pai
achega
c2d023ce74
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      raft/storage_test.go

+ 5 - 0
raft/storage_test.go

@@ -210,6 +210,11 @@ func TestStorageAppend(t *testing.T) {
 		werr     error
 		werr     error
 		wentries []pb.Entry
 		wentries []pb.Entry
 	}{
 	}{
+		{
+			[]pb.Entry{{Index: 1, Term: 1}, {Index: 2, Term: 2}},
+			nil,
+			[]pb.Entry{{Index: 3, Term: 3}, {Index: 4, Term: 4}, {Index: 5, Term: 5}},
+		},
 		{
 		{
 			[]pb.Entry{{Index: 3, Term: 3}, {Index: 4, Term: 4}, {Index: 5, Term: 5}},
 			[]pb.Entry{{Index: 3, Term: 3}, {Index: 4, Term: 4}, {Index: 5, Term: 5}},
 			nil,
 			nil,