RunCommandLogs: add a did_succeed helper
[?]
Nov 18, 2021, 7:27 PM
RZBW3YWDH4BXCTSM4KW4MWBOD5QYATN6RK62IPESVXW2NNO3MEGACDependencies
- [2]
CBU7KGFERecord the errno if exec fails - [*]
2GNJU4VFRunCommandLogs: init table - [*]
VYS5RV7YRunCommand: create run logs for each execution - [*]
3AKZKWCRRunCommand: Test
Change contents
- edit in src/lib/Hydra/Schema/Result/RunCommandLogs.pm at line 230
=head2 did_succeedReturn:* true if the task ran and finished successfully,* false if the task did not run successfully but is completed* undef if the task has not yet run=cutsub did_succeed {my ($self) = @_; - edit in src/lib/Hydra/Schema/Result/RunCommandLogs.pm at line 243
if (!defined($self->end_time)) {return undef;} - edit in src/lib/Hydra/Schema/Result/RunCommandLogs.pm at line 247
if (!defined($self->exit_code)) {return 0;}return $self->exit_code == 0;} - edit in t/Schema/Result/RunCommandLogs.t at line 56
is($runlog->did_succeed(), undef, "The process has not yet succeeded."); - edit in t/Schema/Result/RunCommandLogs.t at line 68
ok($runlog->did_succeed(), "The process did succeed."); - edit in t/Schema/Result/RunCommandLogs.t at line 81
ok(!$runlog->did_succeed(), "The process did not succeed."); - edit in t/Schema/Result/RunCommandLogs.t at line 94
ok(!$runlog->did_succeed(), "The process did not succeed."); - edit in t/Schema/Result/RunCommandLogs.t at line 107
ok(!$runlog->did_succeed(), "The process did not succeed."); - edit in t/plugins/RunCommand/basic.t at line 55
ok($runlog->did_succeed(), "The process did succeed."); - edit in t/plugins/RunCommand/errno.t at line 42
ok(!$runlog->did_succeed(), "The process did not succeed.");