2022-03-19 18:35:30 +00:00
|
|
|
|
use strict;
|
|
|
|
|
use warnings;
|
|
|
|
|
use Setup;
|
|
|
|
|
use Test2::V0;
|
|
|
|
|
use Hydra::Helper::Exec;
|
|
|
|
|
|
|
|
|
|
my $ctx = test_context();
|
|
|
|
|
|
|
|
|
|
my $jobsetCtx = $ctx->makeJobset(
|
|
|
|
|
expression => 'constituents-broken.nix',
|
|
|
|
|
);
|
|
|
|
|
my $jobset = $jobsetCtx->{"jobset"};
|
|
|
|
|
|
|
|
|
|
my ($res, $stdout, $stderr) = captureStdoutStderr(60,
|
|
|
|
|
("hydra-eval-jobset", $jobsetCtx->{"project"}->name, $jobset->name)
|
|
|
|
|
);
|
|
|
|
|
isnt($res, 0, "hydra-eval-jobset exits non-zero");
|
|
|
|
|
ok(utf8::decode($stderr), "Stderr output is UTF8-clean");
|
|
|
|
|
like(
|
|
|
|
|
$stderr,
|
|
|
|
|
qr/aggregate job ‘mixed_aggregate’ failed with the error: constituentA: does not exist/,
|
|
|
|
|
"The stderr record includes a relevant error message"
|
|
|
|
|
);
|
|
|
|
|
|
2024-04-12 15:33:27 +00:00
|
|
|
|
$jobset->discard_changes({ '+columns' => {'errormsg' => 'errormsg'} }); # refresh from DB
|
2022-03-19 18:35:30 +00:00
|
|
|
|
like(
|
|
|
|
|
$jobset->errormsg,
|
|
|
|
|
qr/aggregate job ‘mixed_aggregate’ failed with the error: constituentA: does not exist/,
|
|
|
|
|
"The jobset records a relevant error message"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
done_testing;
|