( t *testing.T, manager *Service, agent ActorContext, now time.Time, )
| 124 | } |
| 125 | |
| 126 | func 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 | |
| 146 | func validAgentActorContextForPostCommitHookTest() ActorContext { |
| 147 | agent := validActorContext() |
no test coverage detected