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

Function claimNextRunForPostCommitHookTest

internal/task/hooks_postcommit_test.go:126–144  ·  view source on GitHub ↗
(
	t *testing.T,
	manager *Service,
	agent ActorContext,
	now time.Time,
)

Source from the content-addressed store, hash-verified

124}
125
126func claimNextRunForPostCommitHookTest(
127 t *testing.T,
128 manager *Service,
129 agent ActorContext,
130 now time.Time,
131) *ClaimResult {
132 t.Helper()
133
134 claim, err := manager.ClaimNextRun(context.Background(), ClaimCriteria{
135 Scope: ScopeGlobal,
136 ClaimerSessionID: "sess-post-commit-hooks",
137 LeaseDuration: 2 * time.Minute,
138 Now: now,
139 }, agent)
140 if err != nil {
141 t.Fatalf("ClaimNextRun() error = %v", err)
142 }
143 return claim
144}
145
146func validAgentActorContextForPostCommitHookTest() ActorContext {
147 agent := validActorContext()

Calls 1

ClaimNextRunMethod · 0.65

Tested by

no test coverage detected