Skip to content

Commit 6276b00

Browse files
committed
update DSN logging message
1 parent 0a3190e commit 6276b00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/database/dbtestutil/postgres.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ func WithLogDSN(logDSN bool) OpenOption {
162162
// TBSubset is a subset of the testing.TB interface.
163163
// It allows to use dbtestutil.Open outside of tests.
164164
type TBSubset interface {
165+
Name() string
165166
Cleanup(func())
166167
Helper()
167168
Logf(format string, args ...any)
@@ -239,7 +240,7 @@ func Open(t TBSubset, opts ...OpenOption) (string, error) {
239240

240241
// Optionally log the DSN to help connect to the test database.
241242
if openOptions.LogDSN {
242-
_, _ = fmt.Fprintf(os.Stderr, "Connect to this test database using: psql '%s'\n", dsn)
243+
_, _ = fmt.Fprintf(os.Stderr, "Connect to the database for %s using: psql '%s'\n", t.Name(), dsn)
243244
}
244245
return dsn, nil
245246
}

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