t/lib/HydraTestContext: set queue runner port to 0

This makes the exposer choose a random, available port.
This commit is contained in:
Cole Helbling 2022-03-29 11:33:40 -07:00
parent 4789eba92c
commit 9c1f36c47c
2 changed files with 2 additions and 0 deletions

View file

@ -20,6 +20,7 @@ write_file($ctx{'tmpdir'} . "/bar.conf", q|
|);
is(getHydraConfig(), {
queue_runner_metrics_port => 0,
foo => { bar => "baz" }
}, "Nested includes work.");

View file

@ -51,6 +51,7 @@ sub new {
$ENV{'HYDRA_CONFIG'} = "$dir/hydra.conf";
my $hydra_config = $opts{'hydra_config'} || "";
$hydra_config = "queue_runner_metrics_port = 0\n" . $hydra_config;
if ($opts{'use_external_destination_store'} // 1) {
$hydra_config = "store_uri = file:$dir/nix/dest-store\n" . $hydra_config;
}