tests: use env-test as .env file, instead of Overrides setting

This commit is contained in:
Helmut Merz 2025-07-16 15:10:11 +02:00
parent c252841911
commit 20214b636e
3 changed files with 10 additions and 2 deletions

6
tests/env-test Normal file
View file

@ -0,0 +1,6 @@
# env-test - environment settings for testing
SCOPES_LOGLEVEL=debug
SCOPES_SQLITE_CONNSTR=data/scopes.sqlite
SCOPES_PGSQL_CONNSTR="user=ccotest password=cco dbname=scpstest"

View file

@ -13,7 +13,8 @@ import (
)
func Config() lib.Config {
ovr := Overrides().Use
//ovr := Overrides().Use
ovr := config.Overrides("env-test").Use
b := config.Base
app_c := &app.Cfg{

View file

@ -14,7 +14,8 @@ func ConfigSqlite() *sql.Cfg {
}
func ConfigPgsql() *sql.Cfg {
ovr := OverridesSql().Use
//ovr := OverridesSql().Use
ovr := config.Overrides("env-test").Use
return &sql.Cfg{
Driver: "postgres",
Connstr: ovr("user=ccotest password=cco dbname=ccotest", PGSQL_CONNSTR),