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 parent0a3190e commit6276b00Copy full SHA for 6276b00
coderd/database/dbtestutil/postgres.go
@@ -162,6 +162,7 @@ func WithLogDSN(logDSN bool) OpenOption {
162
// TBSubset is a subset of the testing.TB interface.
163
// It allows to use dbtestutil.Open outside of tests.
164
typeTBSubsetinterface {
165
+Name()string
166
Cleanup(func())
167
Helper()
168
Logf(formatstring,args...any)
@@ -239,7 +240,7 @@ func Open(t TBSubset, opts ...OpenOption) (string, error) {
239
240
241
// Optionally log the DSN to help connect to the test database.
242
ifopenOptions.LogDSN {
-_,_=fmt.Fprintf(os.Stderr,"Connect tothis testdatabase using: psql '%s'\n",dsn)
243
+_,_=fmt.Fprintf(os.Stderr,"Connect tothedatabasefor %susing: psql '%s'\n",t.Name(),dsn)
244
}
245
returndsn,nil
246