tests: move to t, allow yath test
from root
By moving the tests subdirectory to t, we gain the ability to run `yath test` with no arguments from inside `nix develop` in the root of the the repo. (`nix develop` is necessary in order to set the proper env vars for `yath` to find our test libraries.)
This commit is contained in:
29
t/input-types/git-rev.t
Normal file
29
t/input-types/git-rev.t
Normal file
@ -0,0 +1,29 @@
|
||||
use strict;
|
||||
use Setup;
|
||||
use TestScmInput;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
# Tests the creation of a Hydra jobset using a git revision as input.
|
||||
testScmInput(
|
||||
type => 'git',
|
||||
name => 'git-rev',
|
||||
expr => 'git-rev-input.nix',
|
||||
uri => 'git-repo 7f60df502b96fd54bbfa64dd94b56d936a407701',
|
||||
update => 'jobs/git-rev-update.sh',
|
||||
|
||||
# directories
|
||||
datadir => $ctx{tmpdir},
|
||||
testdir => $ctx{testdir},
|
||||
jobsdir => $ctx{jobsdir},
|
||||
);
|
||||
|
||||
done_testing;
|
Reference in New Issue
Block a user