Merge pull request #1113 from DeterminateSystems/project-jobset/steps

Project jobset: update /steps
This commit is contained in:
Graham Christensen 2022-01-14 17:00:52 -05:00 committed by GitHub
commit 9cc3e4264d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View file

@ -80,7 +80,7 @@ BLOCK renderFullJobName %]
BLOCK renderFullJobNameOfBuild; BLOCK renderFullJobNameOfBuild;
INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job"); INCLUDE renderFullJobName project=build.jobset.get_column("project") jobset = build.jobset.get_column("name") job = build.get_column("job");
END; END;

View file

@ -11,7 +11,12 @@ my $ctx = test_context();
Catalyst::Test->import('Hydra'); Catalyst::Test->import('Hydra');
my $builds = $ctx->makeAndEvaluateJobset( my $doneBuilds = $ctx->makeAndEvaluateJobset(
expression => "basic.nix",
build => 1
);
my $queuedBuilds = $ctx->makeAndEvaluateJobset(
expression => "basic.nix" expression => "basic.nix"
); );
@ -44,7 +49,7 @@ subtest "/queue" => sub {
}; };
subtest "/search" => sub { subtest "/search" => sub {
my $build = $builds->{"empty_dir"}; my $build = $doneBuilds->{"empty_dir"};
my ($build_output_out) = $build->buildoutputs->find({ name => "out" }); my ($build_output_out) = $build->buildoutputs->find({ name => "out" });
subtest "searching for projects" => sub { subtest "searching for projects" => sub {
my $response = request(GET "/search?query=${\$build->project->name}"); my $response = request(GET "/search?query=${\$build->project->name}");
@ -85,4 +90,14 @@ subtest "/status" => sub {
} }
}; };
subtest "/steps" => sub {
my $response = request(GET '/steps');
is($response->code, 200, "The page showing steps 200's.");
};
subtest "/evals" => sub {
my $response = request(GET '/evals');
is($response->code, 200, "The page showing evals 200's.");
};
done_testing; done_testing;