We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent495222c commit68f5f07Copy full SHA for 68f5f07
coderd/database/dbtestutil/postgres.go
@@ -40,6 +40,10 @@ func (p ConnectionParams) DSN() string {
40
returnfmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable",p.Username,p.Password,p.Host,p.Port,p.DBName)
41
}
42
43
+// WillLogDSN returns true if the DSN should be shown during testing.
44
+// Set the CODER_TEST_LOG_PG_DSN environment variable to show the DSN.
45
+// This provides an ergonomic way to connect to test databases during
46
+// debugging without the need to spin up postgres manually.
47
funcWillLogDSN()bool {
48
returnos.Getenv("CODER_TEST_LOG_PG_DSN")!=""
49