RunCommand: emit the finished field as a boolean

This commit is contained in:
Graham Christensen 2021-02-25 12:47:56 -05:00
parent 1f4183e05f
commit 2179b4b4b0
No known key found for this signature in database
GPG key ID: FE918C3A98C1030F
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ sub buildFinished {
my $json = {
event => $event,
build => $build->id,
finished => $build->get_column('finished'),
finished => $build->get_column('finished') ? JSON::true : JSON::false,
timestamp => $build->get_column('timestamp'),
project => $build->get_column('project'),
jobset => $build->get_column('jobset'),

View file

@ -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->{buildStatus}, 0, "The build status 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->{jobset}, "basic", "The jobset matches.");
is($dat->{job}, "metrics", "The job matches.");