tests: use env-test as .env file, instead of Overrides setting
This commit is contained in:
parent
c252841911
commit
20214b636e
3 changed files with 10 additions and 2 deletions
6
tests/env-test
Normal file
6
tests/env-test
Normal 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"
|
|
@ -13,7 +13,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Config() lib.Config {
|
func Config() lib.Config {
|
||||||
ovr := Overrides().Use
|
//ovr := Overrides().Use
|
||||||
|
ovr := config.Overrides("env-test").Use
|
||||||
b := config.Base
|
b := config.Base
|
||||||
|
|
||||||
app_c := &app.Cfg{
|
app_c := &app.Cfg{
|
||||||
|
|
|
@ -14,7 +14,8 @@ func ConfigSqlite() *sql.Cfg {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ConfigPgsql() *sql.Cfg {
|
func ConfigPgsql() *sql.Cfg {
|
||||||
ovr := OverridesSql().Use
|
//ovr := OverridesSql().Use
|
||||||
|
ovr := config.Overrides("env-test").Use
|
||||||
return &sql.Cfg{
|
return &sql.Cfg{
|
||||||
Driver: "postgres",
|
Driver: "postgres",
|
||||||
Connstr: ovr("user=ccotest password=cco dbname=ccotest", PGSQL_CONNSTR),
|
Connstr: ovr("user=ccotest password=cco dbname=ccotest", PGSQL_CONNSTR),
|
||||||
|
|
Loading…
Add table
Reference in a new issue