Cleanup Jobset serialization
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
use LWP::UserAgent;
|
||||
use JSON;
|
||||
use Test::Simple tests => 7;
|
||||
use Test::Simple tests => 9;
|
||||
#use Test::Simple tests => 15;
|
||||
|
||||
my $ua = LWP::UserAgent->new;
|
||||
@ -38,14 +38,15 @@ my $project = decode_json(request_json({ uri => '/project/sample' })->content())
|
||||
|
||||
ok((not @{$project->{jobsets}}), "A new project has no jobsets");
|
||||
|
||||
=begin comment
|
||||
|
||||
$result = request_json({ uri => '/jobset/sample/default', method => 'PUT', data => { nixexprpath => "default.nix", nixexprinput => "my-src", inputs => { "my-src" => { type => "path", values => "/run/jobset" } }, enabled => "1", checkinterval => "3600"} });
|
||||
ok($result->code() == 201, "PUTting a new jobset creates it");
|
||||
|
||||
my $jobset = decode_json(request_json({ uri => '/jobset/sample/default' })->content());
|
||||
|
||||
ok($jobset->{jobsetinputs}->[0]->{name} eq "my-src", "The new jobset has a 'my-src' input");
|
||||
ok($jobset->{jobsetinputs}->[0] eq "my-src", "The new jobset has a 'my-src' input");
|
||||
|
||||
=begin comment
|
||||
|
||||
ok($jobset->{jobsetinputs}->[0]->{jobsetinputalts}->[0]->{value} eq "/run/jobset", "The 'my-src' input is in /run/jobset");
|
||||
|
||||
system("LOGNAME=root NIX_STORE_DIR=/run/nix/store NIX_LOG_DIR=/run/nix/var/log/nix NIX_STATE_DIR=/run/nix/var/nix HYDRA_DATA=/var/lib/hydra HYDRA_DBI='dbi:Pg:dbname=hydra;user=root;' hydra-evaluator sample default");
|
||||
|
Reference in New Issue
Block a user