RunCommandLogs.t: use test_context to get a specific build
Fixes a build error: Can't use global @_ in 'my' at Schema/Result/RunCommandLogs.t line 20, near ', @_'
This commit is contained in:
parent
2f382ba067
commit
06360bfbb6
|
@ -1,23 +1,16 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
my $ctx = test_context();
|
||||
my $db = $ctx->db();
|
||||
|
||||
my $project = $db->resultset('Projects')->create({name => "tests", displayname => "", owner => "root"});
|
||||
my $jobset = createBaseJobset("basic", "basic.nix", $ctx{jobsdir});
|
||||
ok(evalSucceeds($jobset), "Evaluating jobs/basic.nix should exit with return code 0");
|
||||
is(nrQueuedBuildsForJobset($jobset), 3, "Evaluating jobs/basic.nix should result in 3 builds");
|
||||
my $builds = $ctx->makeAndEvaluateJobset(
|
||||
expression => "basic.nix",
|
||||
);
|
||||
|
||||
my ($build, @_) = queuedBuildsForJobset($jobset);
|
||||
my $build = $builds->{"empty_dir"};
|
||||
|
||||
sub new_run_log {
|
||||
return $db->resultset('RunCommandLogs')->create({
|
||||
|
@ -27,7 +20,6 @@ sub new_run_log {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
subtest "Not yet started" => sub {
|
||||
my $runlog = new_run_log();
|
||||
|
||||
|
|
Loading…
Reference in a new issue