forked from lix-project/hydra
t/JobsetEval: test GETing the eval page
This commit is contained in:
parent
157a02bff7
commit
1ca786561f
28
t/Controller/JobsetEval/fetch.t
Normal file
28
t/Controller/JobsetEval/fetch.t
Normal file
|
@ -0,0 +1,28 @@
|
|||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
use JSON::MaybeXS qw(decode_json encode_json);
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
require Hydra::Helper::Nix;
|
||||
|
||||
use Test2::V0;
|
||||
require Catalyst::Test;
|
||||
Catalyst::Test->import('Hydra');
|
||||
use HTTP::Request::Common qw(POST PUT GET DELETE);
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
my $jobset = createBaseJobset("basic", "basic.nix", $ctx{jobsdir});
|
||||
ok(evalSucceeds($jobset), "Evaluating jobs/basic.nix should exit with return code 0");
|
||||
|
||||
my ($eval, @evals) = $jobset->jobsetevals;
|
||||
my $fetch = request(GET '/eval/' . $eval->id);
|
||||
is($fetch->code, 200, "eval page is 200");
|
||||
|
||||
done_testing;
|
Loading…
Reference in a new issue