From 21d3c7b5ef4461eabd871928c840d485996667cc Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Fri, 17 Mar 2023 12:02:19 +0100 Subject: [PATCH] Fix --- server/channels/store/sqlstore/store_test.go | 2 ++ server/channels/store/storetest/settings.go | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/server/channels/store/sqlstore/store_test.go b/server/channels/store/sqlstore/store_test.go index 9a5f3f57b0..458287bc08 100644 --- a/server/channels/store/sqlstore/store_test.go +++ b/server/channels/store/sqlstore/store_test.go @@ -761,6 +761,8 @@ func TestReplicaLagQuery(t *testing.T) { } func makeSqlSettings(driver string) *model.SqlSettings { + fmt.Printf("!!!!!! makeSqlSettings with driver=%s\n", driver) + switch driver { case model.DatabaseDriverPostgres: return storetest.MakeSqlSettings(driver, false) diff --git a/server/channels/store/storetest/settings.go b/server/channels/store/storetest/settings.go index 27d196e5dd..31dad28aba 100644 --- a/server/channels/store/storetest/settings.go +++ b/server/channels/store/storetest/settings.go @@ -52,6 +52,8 @@ func log(message string) { // The database name is generated randomly and must be created before use. func MySQLSettings(withReplica bool) *model.SqlSettings { dsn := os.Getenv("TEST_DATABASE_MYSQL_DSN") + + fmt.Printf("!!!!!! MySQLSettings with TEST_DATABASE_MYSQL_DSN=%s\n", dsn) if dsn == "" { dsn = defaultMysqlDSN mlog.Info("No TEST_DATABASE_MYSQL_DSN override, using default", mlog.String("default_dsn", dsn)) @@ -84,6 +86,9 @@ func MySQLSettings(withReplica bool) *model.SqlSettings { // The database name is generated randomly and must be created before use. func PostgreSQLSettings() *model.SqlSettings { dsn := os.Getenv("TEST_DATABASE_POSTGRESQL_DSN") + + fmt.Printf("!!!!!! PostgreSQLSettings with TEST_DATABASE_POSTGRESQL_DSN=%s\n", dsn) + if dsn == "" { dsn = defaultPostgresqlDSN mlog.Info("No TEST_DATABASE_POSTGRESQL_DSN override, using default", mlog.String("default_dsn", dsn)) @@ -224,6 +229,7 @@ func MakeSqlSettings(driver string, withReplica bool) *model.SqlSettings { switch driver { case model.DatabaseDriverMysql: + fmt.Printf("!!!!!! About to MakeSqlSettings on MySQL with driver=%s\n", driver) settings = MySQLSettings(withReplica) dbName = mySQLDSNDatabase(*settings.DataSource) newDSRs := []string{} @@ -232,6 +238,7 @@ func MakeSqlSettings(driver string, withReplica bool) *model.SqlSettings { } settings.DataSourceReplicas = newDSRs case model.DatabaseDriverPostgres: + fmt.Printf("!!!!!! About to MakeSqlSettings on Postgres with driver=%s\n", driver) settings = PostgreSQLSettings() dbName = postgreSQLDSNDatabase(*settings.DataSource) default: