Merge pull request #16458 from ahrtr/snap_20230822

test: verify snap.Load() is sucessful
This commit is contained in:
Marek Siarkowicz 2023-08-22 11:43:38 +02:00 committed by GitHub
commit 3794dfd519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,6 +302,7 @@ func verifySnapshotMembers(t *testing.T, epc *e2e.EtcdProcessCluster, expectedMe
t.Logf("Verifying snapshot for member %d", i)
ss := snap.New(epc.Cfg.Logger, datadir.ToSnapDir(epc.Procs[i].Config().DataDirPath))
snap, err := ss.Load()
require.NoError(t, err)
st := v2store.New(etcdserver.StoreClusterPrefix, etcdserver.StoreKeysPrefix)
err = st.Recovery(snap.Data)
assert.NoError(t, err)