MCPcopy Index your code
hub / github.com/coder/coder / testSQLDB

Function testSQLDB

coderd/database/db_test.go:114–125  ·  view source on GitHub ↗
(t testing.TB)

Source from the content-addressed store, hash-verified

112}
113
114func testSQLDB(t testing.TB) *sql.DB {
115 t.Helper()
116
117 connection, err := dbtestutil.Open(t)
118 require.NoError(t, err)
119
120 db, err := sql.Open("postgres", connection)
121 require.NoError(t, err)
122 t.Cleanup(func() { _ = db.Close() })
123
124 return db
125}

Calls 5

OpenFunction · 0.92
HelperMethod · 0.65
CleanupMethod · 0.65
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected