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

Function NewWithProvisionerCloser

coderd/coderdtest/coderdtest.go:221–228  ·  view source on GitHub ↗

NewWithProvisionerCloser returns a client as well as a handle to close the provisioner. This is a temporary function while work is done to standardize how provisioners are registered with coderd. The option to include a provisioner is set to true for convenience.

(t testing.TB, options *Options)

Source from the content-addressed store, hash-verified

219// standardize how provisioners are registered with coderd. The option
220// to include a provisioner is set to true for convenience.
221func NewWithProvisionerCloser(t testing.TB, options *Options) (*codersdk.Client, io.Closer) {
222 if options == nil {
223 options = &Options{}
224 }
225 options.IncludeProvisionerDaemon = true
226 client, closer := newWithCloser(t, options)
227 return client, closer
228}
229
230// newWithCloser constructs a codersdk client connected to an in-memory API instance.
231// The returned closer closes a provisioner if it was provided

Callers 9

TestWorkspaceWatcherFunction · 0.92
TestPostWorkspaceBuildFunction · 0.92
TestDeleteUserFunction · 0.92
TestTasksFunction · 0.92
TestDeleteFunction · 0.92

Calls 1

newWithCloserFunction · 0.85

Tested by 9

TestWorkspaceWatcherFunction · 0.74
TestPostWorkspaceBuildFunction · 0.74
TestDeleteUserFunction · 0.74
TestTasksFunction · 0.74
TestDeleteFunction · 0.74