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

Struct fakeOrderedStore

coderd/provisionerdserver/acquirer_test.go:565–576  ·  view source on GitHub ↗

fakeOrderedStore is a fake store that lets tests send AcquireProvisionerJob results in order over a channel, and tests for overlapped calls.

Source from the content-addressed store, hash-verified

563// fakeOrderedStore is a fake store that lets tests send AcquireProvisionerJob
564// results in order over a channel, and tests for overlapped calls.
565type fakeOrderedStore struct {
566 jobs chan database.ProvisionerJob
567 errors chan error
568
569 mu sync.Mutex
570 params []database.AcquireProvisionerJobParams
571
572 // inflight and overlaps track whether any calls from workers overlap with
573 // one another
574 inflight map[uuid.UUID]bool
575 overlaps [][]uuid.UUID
576}
577
578func newFakeOrderedStore() *fakeOrderedStore {
579 return &fakeOrderedStore{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected