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)
| 219 | // standardize how provisioners are registered with coderd. The option |
| 220 | // to include a provisioner is set to true for convenience. |
| 221 | func 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 |