0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-11 22:15:38 +02:00

Fix ToActionWorkflowRun call in action_test.go after signature change

Co-Authored-By: Claude Sonnet 4.6 <claude-sonnet-4-6@anthropic.com>
This commit is contained in:
Ross Golder 2026-05-02 10:51:47 +07:00
parent 37bbccb0eb
commit 674e8acd46
No known key found for this signature in database
GPG Key ID: 253A7E508D2D59CD

View File

@ -115,12 +115,11 @@ func TestToActionWorkflowRun_UsesTriggerEvent(t *testing.T) {
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
run := unittest.AssertExistsAndLoadBean(t, &actions_model.ActionRun{ID: 803})
run.Repo = repo
// Scheduled runs keep Event as the registration event (push) and use TriggerEvent as the real trigger.
run.Event = "push"
run.TriggerEvent = "schedule"
apiRun, err := ToActionWorkflowRun(t.Context(), run, nil)
apiRun, err := ToActionWorkflowRun(t.Context(), repo, run, nil)
require.NoError(t, err)
assert.Equal(t, "schedule", apiRun.Event)
}