bug: require.Eventually must not test with assert

Otherwise it fails the test instead of retrying if the condition fails
at least once.

(cherry picked from commit 2541a943ce)
This commit is contained in:
Earl Warren 2024-11-09 00:07:18 +01:00 committed by forgejo-backport-action
parent 3a4612cb2b
commit 8c51053739

View file

@ -321,7 +321,7 @@ jobs:
require.Eventually(t, func() bool {
actionRuns = make([]*actions_model.ActionRun, 0)
require.NoError(t, db.GetEngine(db.DefaultContext).Where("repo_id=?", baseRepo.ID).Find(&actionRuns))
return assert.Len(t, actionRuns, count)
return len(actionRuns) == count
}, 30*time.Second, 1*time.Second)
// verify the expected ActionRuns were created