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

Function TestOpen_InvalidDBFrom

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

Source from the content-addressed store, hash-verified

33}
34
35func TestOpen_InvalidDBFrom(t *testing.T) {
36 t.Parallel()
37
38 _, err := dbtestutil.Open(t, dbtestutil.WithDBFrom("__invalid__"))
39 require.Error(t, err)
40 require.ErrorContains(t, err, "template database")
41 require.ErrorContains(t, err, "does not exist")
42}
43
44func TestOpen_ValidDBFrom(t *testing.T) {
45 t.Parallel()

Callers

nothing calls this directly

Calls 3

OpenFunction · 0.92
WithDBFromFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected