RunCommandLogs: add a helper for if it failed with an exec error

This commit is contained in:
Graham Christensen
2021-11-19 14:17:20 -05:00
parent d849856dcd
commit a7aeb766aa
3 changed files with 29 additions and 0 deletions

View File

@ -40,6 +40,7 @@ ok(sendNotifications(), "Notifications execute successfully.");
subtest "Validate a run log was created" => sub {
my $runlog = $build->runcommandlogs->find({});
ok(!$runlog->did_succeed(), "The process did not succeed.");
ok($runlog->did_fail_with_exec_error(), "The process failed to start due to an exec error.");
is($runlog->job_matcher, "*:*:*", "An unspecified job matcher is defaulted to *:*:*");
is($runlog->command, 'invalid-command-this-does-not-exist', "The executed command is saved.");
is($runlog->start_time, within(time() - 1, 2), "The start time is recent.");