forked from lix-project/hydra
t/RunCommand: test that the log file exists on the filesystem
This commit is contained in:
parent
1554750acc
commit
988e79c6e5
|
@ -58,6 +58,13 @@ subtest "Validate a run log was created" => sub {
|
|||
is($runlog->start_time, within(time() - 1, 2), "The start time is recent.");
|
||||
is($runlog->end_time, within(time() - 1, 2), "The end time is also recent.");
|
||||
is($runlog->exit_code, 0, "This command should have succeeded.");
|
||||
|
||||
subtest "Validate the run log file exists" => sub {
|
||||
my $filename = Hydra::Helper::Nix::constructRunCommandLogFilename(sha1_hex($runlog->command), $build->get_column('id'));
|
||||
my $logPath = Hydra::Helper::Nix::constructRunCommandLogPath($filename);
|
||||
ok(-f $logPath, "The run log was saved to a file.");
|
||||
ok(-z $logPath, "The run log was empty.");
|
||||
};
|
||||
};
|
||||
|
||||
done_testing;
|
||||
|
|
Loading…
Reference in a new issue