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

Function NewWithDatabase

coderd/coderdtest/coderdtest.go:212–215  ·  view source on GitHub ↗

NewWithDatabase constructs a codersdk client connected to an in-memory API instance. The database is returned to provide direct data manipulation for tests.

(t testing.TB, options *Options)

Source from the content-addressed store, hash-verified

210// NewWithDatabase constructs a codersdk client connected to an in-memory API instance.
211// The database is returned to provide direct data manipulation for tests.
212func NewWithDatabase(t testing.TB, options *Options) (*codersdk.Client, database.Store) {
213 client, _, api := NewWithAPI(t, options)
214 return client, api.Database
215}
216
217// NewWithProvisionerCloser returns a client as well as a handle to close
218// the provisioner. This is a temporary function while work is done to

Calls 1

NewWithAPIFunction · 0.70