determine-test-runners: test --dependents

This commit is contained in:
Carlo Cabrera 2023-04-04 01:01:04 +08:00
parent 4dc370ca24
commit d5dc9ee5e0
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -33,7 +33,6 @@ describe "brew determine-test-runners" do
it "assigns all runners for formulae without any requirements", :integration_test, :needs_linux do it "assigns all runners for formulae without any requirements", :integration_test, :needs_linux do
setup_test_formula "testball" setup_test_formula "testball"
ohai runner_env
expect { brew "determine-test-runners", "testball", runner_env } expect { brew "determine-test-runners", "testball", runner_env }
.to not_to_output.to_stdout .to not_to_output.to_stdout
.and not_to_output.to_stderr .and not_to_output.to_stderr
@ -52,6 +51,20 @@ describe "brew determine-test-runners" do
expect(File.read(github_output)).not_to be_empty expect(File.read(github_output)).not_to be_empty
expect(get_runners(github_output)).to eq(all_runners) expect(get_runners(github_output)).to eq(all_runners)
end end
describe "--dependents" do
it "assigns no runners when a formula has no dependents", :integration_test, :needs_linux do
setup_test_formula "testball"
expect { brew "determine-test-runners", "--dependents", "testball", runner_env }
.to not_to_output.to_stdout
.and not_to_output.to_stderr
.and be_a_success
expect(File.read(github_output)).not_to be_empty
expect(get_runners(github_output)).to be_empty
end
end
end end
def parse_runner_hash(file) def parse_runner_hash(file)