forked from lix-project/hydra
Merge pull request #880 from grahamc/runcommand-finished-bool
RunCommand: emit the `finished` field as a boolean
This commit is contained in:
commit
b9fb66401b
|
@ -62,7 +62,7 @@ sub buildFinished {
|
||||||
my $json = {
|
my $json = {
|
||||||
event => $event,
|
event => $event,
|
||||||
build => $build->id,
|
build => $build->id,
|
||||||
finished => $build->get_column('finished'),
|
finished => $build->get_column('finished') ? JSON::true : JSON::false,
|
||||||
timestamp => $build->get_column('timestamp'),
|
timestamp => $build->get_column('timestamp'),
|
||||||
project => $build->get_column('project'),
|
project => $build->get_column('project'),
|
||||||
jobset => $build->get_column('jobset'),
|
jobset => $build->get_column('jobset'),
|
||||||
|
|
|
@ -53,7 +53,7 @@ subtest "Validate the top level fields match" => sub {
|
||||||
is($dat->{build}, $newbuild->id, "The build event matches our expected ID.");
|
is($dat->{build}, $newbuild->id, "The build event matches our expected ID.");
|
||||||
is($dat->{buildStatus}, 0, "The build status matches.");
|
is($dat->{buildStatus}, 0, "The build status matches.");
|
||||||
is($dat->{event}, "buildFinished", "The build event matches.");
|
is($dat->{event}, "buildFinished", "The build event matches.");
|
||||||
is($dat->{finished}, 1, "The build finished.");
|
is($dat->{finished}, JSON::true, "The build finished.");
|
||||||
is($dat->{project}, "tests", "The project matches.");
|
is($dat->{project}, "tests", "The project matches.");
|
||||||
is($dat->{jobset}, "basic", "The jobset matches.");
|
is($dat->{jobset}, "basic", "The jobset matches.");
|
||||||
is($dat->{job}, "metrics", "The job matches.");
|
is($dat->{job}, "metrics", "The job matches.");
|
||||||
|
|
Loading…
Reference in a new issue