raft: add a batch of interaction-driven conf change tests

Verifiy the behavior in various v1 and v2 conf change operations.
This also includes various fixups, notably it adds protection
against transitioning in and out of new configs when this is not
permissible.

There are more threads to pull, but those are left for future commits.
This commit is contained in:
Tobias Schottdorf
2019-08-15 12:56:04 +02:00
committed by Gyuho Lee
parent d177b7f6b4
commit 078caccce5
15 changed files with 1037 additions and 90 deletions

View File

@ -22,6 +22,9 @@ import (
)
func TestInteraction(t *testing.T) {
// NB: if this test fails, run `go test ./raft -rewrite` and inspect the
// diff. Only commit the changes if you understand what caused them and if
// they are desired.
datadriven.Walk(t, "testdata", func(t *testing.T, path string) {
env := rafttest.NewInteractionEnv(nil)
datadriven.RunTest(t, path, func(d *datadriven.TestData) string {