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:
@ -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)
|
||||
|
Reference in New Issue
Block a user