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

Method Subtest

coderd/database/dbauthz/setup_test.go:179–183  ·  view source on GitHub ↗

Subtest starts up a real postgres database for each test case. Deprecated: Use 'Mocked' instead for much faster tests.

(testCaseF func(db database.Store, check *expects))

Source from the content-addressed store, hash-verified

177// Subtest starts up a real postgres database for each test case.
178// Deprecated: Use 'Mocked' instead for much faster tests.
179func (s *MethodTestSuite) Subtest(testCaseF func(db database.Store, check *expects)) func() {
180 t := s.T()
181 db, _ := dbtestutil.NewDB(t)
182 return s.SubtestWithDB(db, testCaseF)
183}
184
185// SubtestWithDB is a helper function that returns a function that can be passed to
186// s.Run(). This function will run the test case for the method that is being

Calls 2

SubtestWithDBMethod · 0.95
NewDBFunction · 0.92

Tested by

no test coverage detected