diff --git a/t/content-addressed/basic.t b/t/content-addressed/basic.t index 6597e727..4f92b1dc 100644 --- a/t/content-addressed/basic.t +++ b/t/content-addressed/basic.t @@ -27,13 +27,13 @@ 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"); -is(nrQueuedBuildsForJobset($jobset), 5, "Evaluating jobs/content-addressed.nix should result in 4 builds"); +is(nrQueuedBuildsForJobset($jobset), 6, "Evaluating jobs/content-addressed.nix should result in 6 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; + my $expected = $build->job eq "fails" ? 1 : $build->job =~ /with_failed/ ? 6 : $build->job =~ /FailingCA/ ? 2 : 0; is($newbuild->buildstatus, $expected, "Build '".$build->job."' from jobs/content-addressed.nix should have buildstatus $expected."); my $response = request("/build/".$build->id); diff --git a/t/jobs/content-addressed.nix b/t/jobs/content-addressed.nix index 65496df5..03bb56e7 100644 --- a/t/jobs/content-addressed.nix +++ b/t/jobs/content-addressed.nix @@ -25,6 +25,13 @@ rec { FOO = empty_dir; }; + caDependingOnFailingCA = + cfg.mkContentAddressedDerivation { + name = "ca-depending-on-failing-ca"; + builder = ./dir-with-file-builder.sh; + FOO = fails; + }; + nonCaDependingOnCA = cfg.mkDerivation { name = "non-ca-depending-on-ca";