Create copy of test db before unit tests

This commit is contained in:
2026-02-10 07:53:30 +01:00
parent d21943a514
commit 1feb3baf68
4 changed files with 46 additions and 12 deletions

View File

@@ -139,6 +139,13 @@ func nodeTestSetup(t *testing.T) {
}
archiveCfg := fmt.Sprintf("{\"kind\": \"file\",\"path\": \"%s\"}", jobarchive)
if err := ResetConnection(); err != nil {
t.Fatal(err)
}
t.Cleanup(func() {
ResetConnection()
})
Connect(dbfilepath)
if err := archive.Init(json.RawMessage(archiveCfg)); err != nil {