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

Function TestOpen

coderd/database/dbtestutil/postgres_test.go:21–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestOpen(t *testing.T) {
22 t.Parallel()
23
24 connect, err := dbtestutil.Open(t)
25 require.NoError(t, err)
26
27 db, err := sql.Open("postgres", connect)
28 require.NoError(t, err)
29 err = db.Ping()
30 require.NoError(t, err)
31 err = db.Close()
32 require.NoError(t, err)
33}
34
35func TestOpen_InvalidDBFrom(t *testing.T) {
36 t.Parallel()

Callers

nothing calls this directly

Calls 4

OpenFunction · 0.92
PingMethod · 0.65
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected