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

Function WithTestClock

coderd/autobuild/notify/notifier.go:46–50  ·  view source on GitHub ↗

WithTestClock is used in tests to inject a mock Clock

(clk quartz.Clock)

Source from the content-addressed store, hash-verified

44
45// WithTestClock is used in tests to inject a mock Clock
46func WithTestClock(clk quartz.Clock) Option {
47 return func(n *Notifier) {
48 n.clock = clk
49 }
50}
51
52// New returns a Notifier that calls cond once every time it polls.
53// - Duplicate values are removed from countdown, and it is sorted in

Callers 1

TestNotifierFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestNotifierFunction · 0.74