Update agent-run tests for lease-free worker
Drop the lease, heartbeat, and stale-recovery test coverage that no longer applies, and add coverage for the new behaviour: graceful suspend returning a run to PENDING, an approval interruption parking it in AWAITING_APPROVAL, and SubmitApproval merging decisions and requeuing the run. Exercise the submitAgentRunApproval mutation end to end, including the authorization paths for the relocated policies. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -79,21 +79,6 @@ func TestWorkerOptions(t *testing.T) {
|
||||
},
|
||||
)
|
||||
|
||||
t.Run(
|
||||
"lease duration updates only when positive",
|
||||
func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
cfg := workerConfig{leaseDuration: 5 * time.Second}
|
||||
|
||||
WithWorkerLeaseDuration(-1)(&cfg)
|
||||
assert.Equal(t, 5*time.Second, cfg.leaseDuration)
|
||||
|
||||
WithWorkerLeaseDuration(12 * time.Second)(&cfg)
|
||||
assert.Equal(t, 12*time.Second, cfg.leaseDuration)
|
||||
},
|
||||
)
|
||||
|
||||
t.Run(
|
||||
"max concurrency updates only when positive",
|
||||
func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user