Skip to content

Commit

Permalink
Merge pull request #18569 from Homebrew/artifact-test-fix
Browse files Browse the repository at this point in the history
test/utils/github_spec: fix artifact URL test
  • Loading branch information
ZhongRuoyu authored Oct 14, 2024
2 parents fd270c7 + 5a6203a commit aba44a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Library/Homebrew/test/utils/github_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@
it "fails to find artifacts that don't exist" do
expect do
described_class.get_artifact_urls(
described_class.get_workflow_run("Homebrew", "homebrew-core", "135608",
described_class.get_workflow_run("Homebrew", "homebrew-core", "191680",
workflow_id: "triage.yml", artifact_pattern: "false_artifact"),
)
end.to raise_error(/No artifacts with the pattern .+ were found/)
end

it "gets artifact URLs" do
urls = described_class.get_artifact_urls(
described_class.get_workflow_run("Homebrew", "homebrew-core", "135608",
described_class.get_workflow_run("Homebrew", "homebrew-core", "191680",
workflow_id: "triage.yml", artifact_pattern: "event_payload"),
)
expect(urls).to eq(["https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/781984175/zip"])
expect(urls).to eq(["https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/1969725476/zip"])
end

it "supports pattern matching" do
Expand Down

0 comments on commit aba44a4

Please sign in to comment.