.github
datadog
doc
examples
foreman
src
t
Helper
Hydra
Config
Controller
API
Admin
Build
Job
Jobset
builds.t
channel.t
evals.t
http.t
type-constraints.t
JobsetEval
Project
Root
User
metrics.t
projects.t
Event
Helper
Plugin
Schema
View
Event.t
Math.t
PostgresListener.t
TaskDispatcher.t
evaluator
input-types
jobs
lib
queue-runner
scripts
Makefile.am
api-test.t
build-products.t
perlcritic.pl
s3-backup-test.config
s3-backup-test.pl
setup-notifications-jobset.pl
test.pl
.editorconfig
.gitignore
.perlcriticrc
.yath.rc
COPYING
INSTALL
Makefile.am
Procfile
README.md
bootstrap
configure.ac
default.nix
flake.lock
flake.nix
hydra-api.yaml
hydra-module.nix
shell.nix
version.txt
32 lines
841 B
Perl
32 lines
841 B
Perl
use strict;
|
|
use warnings;
|
|
use Setup;
|
|
use Test2::V0;
|
|
use Catalyst::Test ();
|
|
use HTTP::Request::Common;
|
|
|
|
my $ctx = test_context();
|
|
|
|
Catalyst::Test->import('Hydra');
|
|
|
|
my $builds = $ctx->makeAndEvaluateJobset(
|
|
expression => "basic.nix",
|
|
build => 1
|
|
);
|
|
|
|
my $build = $builds->{"empty_dir"};
|
|
my $project = $build->project;
|
|
my $jobset = $build->jobset;
|
|
|
|
subtest "/jobset/PROJECT/JOBSET/all" => sub {
|
|
my $response = request(GET '/jobset/' . $project->name . '/' . $jobset->name . '/all');
|
|
ok($response->is_success, "The page showing the jobset's builds returns 200.");
|
|
};
|
|
|
|
subtest "/jobset/PROJECT/JOBSET/channel/latest" => sub {
|
|
my $response = request(GET '/jobset/' . $project->name . '/' . $jobset->name . '/channel/latest');
|
|
ok($response->is_success, "The page showing the jobset's builds returns 200.");
|
|
};
|
|
|
|
done_testing;
|