WIP integrate multiple conns, menutraversal now panics
This commit is contained in:
parent
8d5d3f1dc8
commit
20feef4103
@ -13,6 +13,7 @@ import (
|
|||||||
testdataloader "github.com/peteole/testdata-loader"
|
testdataloader "github.com/peteole/testdata-loader"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
"git.defalsify.org/vise.git/engine"
|
"git.defalsify.org/vise.git/engine"
|
||||||
|
fsdb "git.defalsify.org/vise.git/db/fs"
|
||||||
"git.defalsify.org/vise.git/logging"
|
"git.defalsify.org/vise.git/logging"
|
||||||
"git.defalsify.org/vise.git/resource"
|
"git.defalsify.org/vise.git/resource"
|
||||||
"git.grassecon.net/grassrootseconomics/visedriver/env"
|
"git.grassecon.net/grassrootseconomics/visedriver/env"
|
||||||
@ -145,9 +146,14 @@ func TestEngine(sessionId string) (engine.Engine, func(), chan bool) {
|
|||||||
fmt.Fprintf(os.Stderr, "connstr parse err: %v", err)
|
fmt.Fprintf(os.Stderr, "connstr parse err: %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
conns.Set(conn, storage.STORETYPE_RESOURCE)
|
resourceConn := fsdb.NewFsDb()
|
||||||
|
err = resourceConn.Connect(ctx, scriptDir)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "resource connect err: %v", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
menuStorageService := storage.NewMenuStorageService(conns)
|
menuStorageService := storage.NewMenuStorageService(conns)
|
||||||
|
menuStorageService = menuStorageService.WithDb(resourceConn, storage.STORETYPE_RESOURCE)
|
||||||
|
|
||||||
rs, err := menuStorageService.GetResource(ctx)
|
rs, err := menuStorageService.GetResource(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user