Skip to content

Commit

Permalink
Fix flake in TestLatestWorkflowRuns (#822)
Browse files Browse the repository at this point in the history
This asserts that two slices match, but the order of values in the
slices depends on map iteration.
  • Loading branch information
bluekeyes authored Aug 15, 2024
1 parent 9e5f2ff commit 38f1378
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pull/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,9 @@ func TestLatestWorkflowRuns(t *testing.T) {
require.NoError(t, err)

assert.Len(t, runs, 3, "incorrect number of workflow runs")
assert.Equal(t, runs[".github/workflows/a.yml"], []string{"success", "skipped"}, "incorrect conclusion for workflow run a")
assert.Equal(t, runs[".github/workflows/b.yml"], []string{"failure"}, "incorrect conclusion for workflow run b")
assert.Equal(t, runs[".github/workflows/c.yml"], []string{"cancelled"}, "incorrect conclusion for workflow run c")
assert.ElementsMatch(t, runs[".github/workflows/a.yml"], []string{"success", "skipped"}, "incorrect conclusion for workflow run a")
assert.ElementsMatch(t, runs[".github/workflows/b.yml"], []string{"failure"}, "incorrect conclusion for workflow run b")
assert.ElementsMatch(t, runs[".github/workflows/c.yml"], []string{"cancelled"}, "incorrect conclusion for workflow run c")
assert.Equal(t, 2, runsRule.Count, "incorrect http request count")
}

Expand Down

0 comments on commit 38f1378

Please sign in to comment.