Commit a13d5050 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0ac05e32
...@@ -91,6 +91,7 @@ func withDemoStorage(t *testing.T, f func(t *testing.T, dsrv *Storage/*XXX -> Sr ...@@ -91,6 +91,7 @@ func withDemoStorage(t *testing.T, f func(t *testing.T, dsrv *Storage/*XXX -> Sr
_, err = xtesting.ZPyRestore(work1+"/base.fs", zdumpBase); X(err) _, err = xtesting.ZPyRestore(work1+"/base.fs", zdumpBase); X(err)
// XXX vvv change to demo:(base)/(δ) // XXX vvv change to demo:(base)/(δ)
// XXX + explain why (restoring copy without original present fails)
_, err = xtesting.ZPyRestore(work1+"/δ.fs", zdumpδ); X(err) _, err = xtesting.ZPyRestore(work1+"/δ.fs", zdumpδ); X(err)
d = openDemo(base, δ); X(err) d = openDemo(base, δ); X(err)
...@@ -104,3 +105,29 @@ func withDemoStorage(t *testing.T, f func(t *testing.T, dsrv *Storage/*XXX -> Sr ...@@ -104,3 +105,29 @@ func withDemoStorage(t *testing.T, f func(t *testing.T, dsrv *Storage/*XXX -> Sr
} }
test1(zodb.TidMax, zdump, "") test1(zodb.TidMax, zdump, "")
} }
func TestEmptyDB(t *testing.T) {
withDemo(t, func(t *testing.T, dsrv ZEOSrv, d *Storage) {
xtesting.DrvTestEmptyDB(t, d)
})
}
func TestLoad(t *testing.T) {
X := xtesting.FatalIf(t)
data := "../fs1/testdata/1.fs"
txnvOk, err := xtesting.LoadDBHistory(data); X(err)
withDemo(t, func(t *testing.T, zsrv ZEOSrv, d *Storage) {
xtesting.DrvTestLoad(t, d, txnvOk)
}, tOptions{
Preload: data,
})
}
func TestWatch(t *testing.T) {
withDemoSrv(t, func(t *testing.T, dsrv DemoSrv) {
xtesting.DrvTestWatch(t, dsrv.URL(), openByURL)
})
}
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