Merge pull request #11592 from bayandin/fix-github-test

github_spec: Fix failed test due to expired artifacts
This commit is contained in:
Mike McQuaid 2021-06-24 15:30:12 +01:00 committed by GitHub
commit ff48561df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,16 +77,16 @@ describe GitHub do
it "fails to find artifacts that don't exist" do
expect {
described_class.get_artifact_url(
described_class.get_workflow_run("Homebrew", "homebrew-core", 51971, artifact_name: "false_bottles"),
described_class.get_workflow_run("Homebrew", "homebrew-core", 79751, artifact_name: "false_bottles"),
)
}.to raise_error(/No artifact .+ was found/)
end
it "gets an artifact link" do
url = described_class.get_artifact_url(
described_class.get_workflow_run("Homebrew", "homebrew-core", 51971, artifact_name: "bottles"),
described_class.get_workflow_run("Homebrew", "homebrew-core", 79751, artifact_name: "bottles"),
)
expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/3557392/zip")
expect(url).to eq("https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/69422207/zip")
end
end