api-test: make created project and jobset visible
This commit is contained in:
parent
adf59a3959
commit
dd1e4a92c0
|
@ -34,14 +34,14 @@ ok($user->{userroles}->[0] eq "admin", "The current user is an admin");
|
|||
|
||||
ok(request_json({ uri => '/project/sample' })->code() == 404, "Non-existent projects don't exist");
|
||||
|
||||
$result = request_json({ uri => '/project/sample', method => 'PUT', data => { displayname => "Sample", enabled => "1", } });
|
||||
$result = request_json({ uri => '/project/sample', method => 'PUT', data => { displayname => "Sample", enabled => "1", visible => "1", } });
|
||||
ok($result->code() == 201, "PUTting a new project creates it");
|
||||
|
||||
my $project = decode_json(request_json({ uri => '/project/sample' })->content());
|
||||
|
||||
ok((not @{$project->{jobsets}}), "A new project has no jobsets");
|
||||
|
||||
$result = request_json({ uri => '/jobset/sample/default', method => 'PUT', data => { nixexprpath => "default.nix", nixexprinput => "my-src", inputs => { "my-src" => { type => "path", value => "/run/jobset" } }, enabled => "1", checkinterval => "3600"} });
|
||||
$result = request_json({ uri => '/jobset/sample/default', method => 'PUT', data => { nixexprpath => "default.nix", nixexprinput => "my-src", inputs => { "my-src" => { type => "path", value => "/run/jobset" } }, enabled => "1", visible => "1", checkinterval => "3600"} });
|
||||
ok($result->code() == 201, "PUTting a new jobset creates it");
|
||||
|
||||
my $jobset = decode_json(request_json({ uri => '/jobset/sample/default' })->content());
|
||||
|
|
Loading…
Reference in a new issue