Integrate verification framework

Verification framework is integrated with:
  - integration tests (by default)
  - `ETCD_VERIFY=all etcdctl snapshot restore` command
  - etcd shutdown when running with `ETCD_VERIFY=all` env.
This commit is contained in:
Piotr Tabor
2021-04-27 17:10:41 +02:00
parent 47b28b600a
commit c4b13a5c83
8 changed files with 51 additions and 21 deletions

View File

@ -22,6 +22,7 @@ import (
grpc_logsettable "github.com/grpc-ecosystem/go-grpc-middleware/logging/settable"
"go.etcd.io/etcd/client/pkg/v3/testutil"
"go.etcd.io/etcd/server/v3/embed"
"go.etcd.io/etcd/server/v3/verify"
"go.uber.org/zap/zapcore"
"go.uber.org/zap/zapgrpc"
"go.uber.org/zap/zaptest"
@ -38,6 +39,9 @@ func BeforeTest(t testutil.TB) {
grpc_logger.Set(zapgrpc.NewLogger(zaptest.NewLogger(t).Named("grpc")))
// Integration tests should verify written state as much as possible.
os.Setenv(verify.ENV_VERIFY, verify.ENV_VERIFY_ALL_VALUE)
previousWD, err := os.Getwd()
if err != nil {
t.Fatal(err)