determine-test-runners: fix test

This commit is contained in:
Carlo Cabrera 2023-05-29 23:04:58 +08:00
parent 40166eb5e7
commit 8860d8398f
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
2 changed files with 1 additions and 3 deletions

View File

@ -11,13 +11,12 @@ describe "brew determine-test-runners" do
let(:linux_runner) { "ubuntu-22.04" } let(:linux_runner) { "ubuntu-22.04" }
# We need to make sure we write to a different path for each example. # We need to make sure we write to a different path for each example.
let(:github_output) { "#{TEST_TMPDIR}/github_output#{DetermineRunnerTestHelper.new.number}" } let(:github_output) { "#{TEST_TMPDIR}/github_output#{DetermineRunnerTestHelper.new.number}" }
let(:ephemeral_suffix) { "-12345-1" } let(:ephemeral_suffix) { "-12345" }
let(:runner_env) do let(:runner_env) do
{ {
"HOMEBREW_LINUX_RUNNER" => linux_runner, "HOMEBREW_LINUX_RUNNER" => linux_runner,
"HOMEBREW_MACOS_TIMEOUT" => "90", "HOMEBREW_MACOS_TIMEOUT" => "90",
"GITHUB_RUN_ID" => ephemeral_suffix.split("-").second, "GITHUB_RUN_ID" => ephemeral_suffix.split("-").second,
"GITHUB_RUN_ATTEMPT" => ephemeral_suffix.split("-").third,
}.freeze }.freeze
end end
let(:all_runners) do let(:all_runners) do

View File

@ -9,7 +9,6 @@ describe GitHubRunnerMatrix do
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_TIMEOUT").and_return("90") allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_TIMEOUT").and_return("90")
allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false").and_return("false") allow(ENV).to receive(:fetch).with("HOMEBREW_MACOS_BUILD_ON_GITHUB_RUNNER", "false").and_return("false")
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ID").and_return("12345") allow(ENV).to receive(:fetch).with("GITHUB_RUN_ID").and_return("12345")
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ATTEMPT").and_return("1")
end end
let(:newest_supported_macos) do let(:newest_supported_macos) do