forked from lix-project/hydra
Cleanup build serialization
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
e04477003e
commit
5d3df69a0b
|
@ -98,23 +98,7 @@ sub build_GET {
|
|||
{ rows => 1, order_by => ["id"] })->single;
|
||||
$self->status_ok(
|
||||
$c,
|
||||
entity => $c->model('DB::Builds')->find($build->id,{
|
||||
columns => [
|
||||
'id',
|
||||
'finished',
|
||||
'timestamp',
|
||||
'buildstatus',
|
||||
'job',
|
||||
'project',
|
||||
'jobset',
|
||||
'starttime',
|
||||
'stoptime',
|
||||
'nixname',
|
||||
'description',
|
||||
'drvpath',
|
||||
'system',
|
||||
]
|
||||
})
|
||||
entity => $build
|
||||
);
|
||||
|
||||
# If this is an aggregate build, get its constituents.
|
||||
|
|
|
@ -601,4 +601,15 @@ makeQueries('ForJobset', "and project = ? and jobset = ?");
|
|||
makeQueries('ForJob', "and project = ? and jobset = ? and job = ?");
|
||||
|
||||
|
||||
my %hint = (
|
||||
columns => [
|
||||
"job",
|
||||
"finished"
|
||||
]
|
||||
);
|
||||
|
||||
sub json_hint {
|
||||
return \%hint;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use LWP::UserAgent;
|
||||
use JSON;
|
||||
use Test::Simple tests => 13;
|
||||
#use Test::Simple tests => 15;
|
||||
use Test::Simple tests => 15;
|
||||
|
||||
my $ua = LWP::UserAgent->new;
|
||||
$ua->cookie_jar({});
|
||||
|
@ -60,12 +59,6 @@ system("echo >> /run/jobset/default.nix; LOGNAME=root NIX_STORE_DIR=/run/nix/sto
|
|||
my $evals = decode_json(request_json({ uri => '/jobset/sample/default/evals' })->content())->{evals};
|
||||
ok($evals->[0]->{eval}->{jobsetevalinputs}->{"my-src"}->{revision} != $evals->[1]->{eval}->{jobsetevalinputs}->{"my-src"}->{revision}, "Changing a jobset source changes its revision");
|
||||
|
||||
=begin comment
|
||||
|
||||
my $build = decode_json(request_json({ uri => "/build/" . $evals->[0]->{jobsetevalmembers}->[0]->{build} })->content());
|
||||
my $build = decode_json(request_json({ uri => "/build/" . $evals->[0]->{eval}->{builds}->[0] })->content());
|
||||
ok($build->{job} eq "job", "The build's job name is job");
|
||||
ok($build->{finished} == 0, "The build isn't finished yet");
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
|
Loading…
Reference in a new issue