Skip to content

Commit

Permalink
Correct flaky test for parseUses
Browse files Browse the repository at this point in the history
Fix a flaky test for the `parseUses` function which could fail if the
randomly generated `ref` value contained an at sign. This would result
in a constructed `uses:` value with multiple at signs, which is not
valid (and would thus error unexpectedly).

This is a followup to 8588dff
  • Loading branch information
ericcornelissen committed Mar 23, 2024
1 parent 1409164 commit ec753f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gha/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func TestParseUses(t *testing.T) {
repo = fmt.Sprintf("%s/%s", repo, path)
}

if strings.ContainsRune(repo, '@') {
if strings.ContainsRune(repo, '@') || strings.ContainsRune(ref, '@') {
return true
}

Expand Down

0 comments on commit ec753f3

Please sign in to comment.