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

Method Close

coderd/coderdtest/coderdtest.go:737–752  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

735}
736
737func (c *ProvisionerdCloser) Close() error {
738 c.mu.Lock()
739 defer c.mu.Unlock()
740 if c.closed {
741 return nil
742 }
743 c.closed = true
744 ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
745 defer cancel()
746 shutdownErr := c.d.Shutdown(ctx, true)
747 closeErr := c.d.Close()
748 if shutdownErr != nil {
749 return shutdownErr
750 }
751 return closeErr
752}
753
754// NewProvisionerDaemon launches a provisionerd instance configured to work
755// well with coderd testing. It registers the "echo" provisioner for

Callers

nothing calls this directly

Calls 4

ShutdownMethod · 0.65
CloseMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected