Skip to content

Commit

Permalink
Update the ca test
Browse files Browse the repository at this point in the history
Make it follow the same APIs and conventions as the rest of the
testsuite
  • Loading branch information
thufschmitt committed Apr 28, 2021
1 parent a4ef141 commit a12704f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/content-addressed.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ my $project = $db->resultset('Projects')->create({name => "tests", displayname =
my $jobset = createBaseJobset("content-addressed", "content-addressed.nix", $ctx{jobsdir});

ok(evalSucceeds($jobset), "Evaluating jobs/content-addressed.nix should exit with return code 0");
ok(nrQueuedBuildsForJobset($jobset) == 3 , "Evaluating jobs/content-addressed.nix should result in 3 builds");
is(nrQueuedBuildsForJobset($jobset), 3, "Evaluating jobs/content-addressed.nix should result in 3 builds");

for my $build (queuedBuildsForJobset($jobset)) {
ok(runBuild($build), "Build '".$build->job."' from jobs/content-addressed.nix should exit with code 0");
my $newbuild = $db->resultset('Builds')->find($build->id);
is($newbuild->finished, 1, "Build '".$build->job."' from jobs/content-addressed.nix should be finished.");
my $expected = $build->job eq "fails" ? 1 : $build->job =~ /with_failed/ ? 6 : 0;
ok($newbuild->finished == 1 && $newbuild->buildstatus == $expected, "Build '".$build->job."' from jobs/content-addressed.nix should have buildstatus $expected");
is($newbuild->buildstatus, $expected, "Build '".$build->job."' from jobs/content-addressed.nix should have buildstatus $expected.");
}


Expand Down

0 comments on commit a12704f

Please sign in to comment.