Commit 3a328caa authored by Kirill Smelkov's avatar Kirill Smelkov

X go/neo: Update it after merging ZODB/go StrictUnicode + other py3-related improvements

FileStorage teestdata now lives in different place(s) and is different
because gen_testdata.py in zodbtools changed.

-> Adjust fs1 testdata path to load and regenerate neo/storage/sqlite from it.
parent fb11d4e3
// Copyright (C) 2020-2023 Nexedi SA and Contributors.
// Copyright (C) 2020-2024 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -657,7 +657,7 @@ func TestEmptyDB(t *testing.T) {
func TestLoad(t *testing.T) {
X := xtesting.FatalIf(t)
data := "../zodb/storage/fs1/testdata/1.fs"
data := fs1Testdata
txnvOk, err := xtesting.LoadDBHistory(data); X(err)
withNEO(t, func(t *testing.T, nsrv NEOSrv, n *Client) {
......
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Copyright (C) 2017-2024 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -39,10 +39,14 @@ import (
"lab.nexedi.com/kirr/go123/xsync"
)
// tests use testdata from FileStorage
// since NEO does not use pickles itself only one zkind is enough for NEO tests
const fs1Testdata = "../zodb/storage/fs1/testdata/py2_pickle3/1.fs"
// Verify basic M+S recovery.
func TestClusterRecoveryBasic(t *testing.T) {
Verify(t, func(t0 *tEnv) {
zback := xfs1back("../zodb/storage/fs1/testdata/1.fs")
zback := xfs1back(fs1Testdata)
t := t0.NewCluster_MS("abc1", zback)
defer t.Stop()
})
......@@ -56,8 +60,8 @@ func _TestMasterStorage(t0 *tEnv) {
X := exc.Raiseif
bg := context.Background()
zback := xfs1back("../zodb/storage/fs1/testdata/1.fs")
zstor := xfs1stor("../zodb/storage/fs1/testdata/1.fs")
zback := xfs1back(fs1Testdata)
zstor := xfs1stor(fs1Testdata)
defer func() {
err := zstor.Close(); X(err)
}()
......@@ -374,7 +378,7 @@ func benchmarkGetObject(b *testing.B, opt tClusterOptions, benchit func(xcload1
tracetest.Run(b, func(t0 *tracetest.T) {
tenv := &tEnv{t0, opt}
// create test cluster
zback := xfs1back("../zodb/storage/fs1/testdata/1.fs")
zback := xfs1back(fs1Testdata)
t := tenv.NewCluster_MS("abc1", zback)
defer t.Stop()
M := t.Master("m")
......
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2021 Nexedi SA and Contributors.
# Copyright (C) 2018-2024 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......@@ -26,7 +26,7 @@ import os
from glob import glob
def main():
zin = storageFromURL("../../../zodb/storage/fs1/testdata/1.fs", read_only=True)
zin = storageFromURL("../../../zodb/storage/fs1/testdata/py2_pickle3/1.fs", read_only=True)
cluster = NEOCluster(db_list=["testdata/1.sqlite"], name="test", adapter="SQLite", clear_databases=True)
cluster.start()
......
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