MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / SetLinkClockForTesting

Method SetLinkClockForTesting

internal/store/testing_helpers.go:364–368  ·  view source on GitHub ↗

SetLinkClockForTesting sets the clock the linked-change time budget reads. Production code must not call this. Set it only with no request in flight.

(clock func() time.Time)

Source from the content-addressed store, hash-verified

362// SetLinkClockForTesting sets the clock the linked-change time budget reads.
363// Production code must not call this. Set it only with no request in flight.
364func (s *Store) SetLinkClockForTesting(clock func() time.Time) (restore func()) {
365 prev := s.linkClock
366 s.linkClock = clock
367 return func() { s.linkClock = prev }
368}
369
370// SeedFromTemplateForTesting seeds the workspace from tmpl exactly as
371// SeedCollectionsFromTemplate seeds it from a shipped template named

Calls

no outgoing calls