Skip to content

Commit

Permalink
orchestrator/updates: fix tests for updated condition threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrebel committed Jun 27, 2024
1 parent 1f4de26 commit a8dfc17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/orchestrator/updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func TestActiveConditionsToReconcile_Updates(t *testing.T) {
}

// set condition CreatedAt to across the stale threshold
cr.Conditions[0].CreatedAt = time.Now().Add(-20 * time.Minute)
cr.Conditions[0].CreatedAt = time.Now().Add(-1 * rctypes.StaleThreshold)

o.repository.Update(ctx, sid, cr.Conditions[0])
if err != nil {
Expand Down Expand Up @@ -436,7 +436,7 @@ func TestEventNeedsReconciliation(t *testing.T) {
}
require.False(t, o.eventNeedsReconciliation(evt), "Condition UpdatedAt")

evt.UpdatedAt = time.Now().Add(-90 * time.Minute)
evt.UpdatedAt = time.Now().Add(-1 * rctypes.StaleThreshold)
evt.ConditionUpdate.State = rctypes.Failed
require.True(t, o.eventNeedsReconciliation(evt), "Condition finalized")

Expand Down

0 comments on commit a8dfc17

Please sign in to comment.