test/utils/github_spec: fix artifact URL test

This does the same as dcba7f356d (#15619) and unblocks CI.
This commit is contained in:
Ruoyu Zhong 2024-10-15 03:01:45 +08:00
parent fd270c78d1
commit 5a6203a285
No known key found for this signature in database

View File

@ -58,7 +58,7 @@ RSpec.describe GitHub do
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/)
@ -66,10 +66,10 @@ RSpec.describe GitHub do
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