MCPcopy Create free account
hub / github.com/compozy/agh / newTaskManagerForTestWithOptions

Function newTaskManagerForTestWithOptions

internal/task/manager_test.go:9695–9714  ·  view source on GitHub ↗
(t *testing.T, store Store, extraOpts ...Option)

Source from the content-addressed store, hash-verified

9693}
9694
9695func newTaskManagerForTestWithOptions(t *testing.T, store Store, extraOpts ...Option) *Service {
9696 t.Helper()
9697
9698 now := time.Date(2026, 4, 14, 15, 0, 0, 0, time.UTC)
9699 counter := 0
9700 options := []Option{
9701 WithStore(store),
9702 WithManagerNow(func() time.Time { return now }),
9703 WithIDGenerator(func(prefix string) string {
9704 counter++
9705 return prefix + "-test-" + strconv.Itoa(counter)
9706 }),
9707 }
9708 options = append(options, extraOpts...)
9709 manager, err := NewManager(options...)
9710 if err != nil {
9711 t.Fatalf("NewManager() error = %v", err)
9712 }
9713 return manager
9714}
9715
9716func setupStaleDependencyReadScenario(
9717 t *testing.T,

Calls 5

appendFunction · 0.85
WithStoreFunction · 0.70
WithManagerNowFunction · 0.70
WithIDGeneratorFunction · 0.70
NewManagerFunction · 0.70

Tested by

no test coverage detected