fix broken test after fixing db teardown to close conn

This commit is contained in:
kim 2024-04-23 14:56:54 +01:00
parent 83de47acde
commit 39f0c6040b
2 changed files with 6 additions and 5 deletions

View File

@ -74,6 +74,7 @@ func (suite *AdminTestSuite) TestCreateInstanceAccount() {
// we need to take an empty db for this...
testrig.StandardDBTeardown(suite.db)
// ...with tables created but no data
suite.db = testrig.NewTestDB(&suite.state)
testrig.CreateTestTables(suite.db)
// make sure there's no instance account in the db yet

View File

@ -57,11 +57,11 @@ func testDefaults() config.Configuration {
TrustedProxies: []string{"127.0.0.1/32", "::1"},
DbType: envStr("GTS_DB_TYPE", "sqlite"),
DbAddress: envStr("GTS_DB_ADDRESS", ":memory:"),
DbPort: envInt("GTS_DB_PORT", 5432),
DbUser: envStr("GTS_DB_USER", "postgres"),
DbPassword: envStr("GTS_DB_PASSWORD", "postgres"),
DbDatabase: envStr("GTS_DB_DATABASE", "postgres"),
DbTLSMode: envStr("GTS_DB_TLS_MODE", "disable"),
DbPort: envInt("GTS_DB_PORT", 0),
DbUser: envStr("GTS_DB_USER", ""),
DbPassword: envStr("GTS_DB_PASSWORD", ""),
DbDatabase: envStr("GTS_DB_DATABASE", ""),
DbTLSMode: envStr("GTS_DB_TLS_MODE", ""),
DbTLSCACert: envStr("GTS_DB_TLS_CA_CERT", ""),
DbMaxOpenConnsMultiplier: 8,
DbSqliteJournalMode: "WAL",