Commit af9c84cf authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent eb42ddf4
......@@ -144,6 +144,15 @@ func withDemo(t *testing.T, f func(t *testing.T, ddat *DemoData, ddrv *Storage),
}, optv...)
}
func TestURL(t *testing.T) {
withDemo(t, func(t *testing.T, ddat *DemoData, ddrv *Storage) {
zurl := ddrv.URL()
zurlOk := ddat.URL()
if zurl != zurlOk {
t.Fatalf("bad zurl:\nhave: %s\nwant: %s", zurl, zurlOk)
}
})
}
func TestEmptyDB(t *testing.T) {
withDemo(t, func(t *testing.T, _ *DemoData, ddrv *Storage) {
......
......@@ -132,7 +132,7 @@ func (fs *FileStorage) LastOid(_ context.Context) (zodb.Oid, error) {
}
func (fs *FileStorage) URL() string {
return fs.file.Name() // XXX + file://
return "file://" + fs.file.Name()
}
// freelist(DataHeader)
......
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