Skip to content

Commit a94d03e

Browse files
committed
comment
1 parent 0890d84 commit a94d03e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

coderd/database/dbtestutil/postgres.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ func (p ConnectionParams) DSN() string {
4040
return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable", p.Username, p.Password, p.Host, p.Port, p.DBName)
4141
}
4242

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.
4347
func WillLogDSN() bool {
4448
return os.Getenv("CODER_TEST_LOG_PG_DSN") != ""
4549
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy