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

@@ -41,6 +41,7 @@ import (
"go.etcd.io/etcd/server/v3/etcdserver/api/v2store"
"go.etcd.io/etcd/server/v3/etcdserver/cindex"
"go.etcd.io/etcd/server/v3/mvcc/backend"
"go.etcd.io/etcd/server/v3/verify"
"go.etcd.io/etcd/server/v3/wal"
"go.etcd.io/etcd/server/v3/wal/walpb"
"go.uber.org/zap"
@@ -276,7 +277,11 @@ func (s *v3Manager) Restore(cfg RestoreConfig) error {
zap.String("snap-dir", s.snapDir),
)
return nil
return verify.VerifyIfEnabled(verify.Config{
ExactIndex: true,
Logger: s.lg,
DataDir: dataDir,
})
}
func (s *v3Manager) outDbPath() string {