Commit 527532fc authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 85a6574c
...@@ -77,9 +77,28 @@ func withDemoStorage(t *testing.T, f func(t *testing.T, dsrv *Storage/*XXX -> Sr ...@@ -77,9 +77,28 @@ func withDemoStorage(t *testing.T, f func(t *testing.T, dsrv *Storage/*XXX -> Sr
} }
// verify on all combinations of preload being split into base+δ // verify on all combinations of preload being split into base+δ
work := xtempdir(t)
defer os.RemoveAll(work)
test1 := func(δstart zodb.Tid, zdumpBase, zdumpδ string) {
t.Helper()
t.Run(fmt.Sprintf("δstart=%s", δstart), func(t *testinf,T) {
t.Helper()
X := xtesting.FatalIf(t)
work1 := filepath.Join(work, δstart.String())
err := os.Mkdir(work1, 0x777); X(err)
/* _, err = xtesting.ZPyRestore(work1+"/base.fs", zdumpBase); X(err)
txnv, err := xtesting.LoadDBHistory(opt.Preload); X(err) // XXX vvv change to demo:(base)/(δ)
_ = txnv _, err = xtesting.ZPyRestore(work1+"/δ.fs", zdumpδ); X(err)
*/
d = openDemo(base, δ); X(err)
defer d.Close()
f(t, d)
})
}
for i := 0; i < len(txnv); i++ {
δstart = txnv[i]
test1(δstart.tid, zdump[:δstart.pos], zdump[δstart.pos:])
}
test1(zodb.TidMax, zdump, "")
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment