forked from lix-project/hydra
tests: replace the flat list of contexts with a hash
This way we can return more values without breaking callers.
This commit is contained in:
parent
26cfe624d5
commit
f08d0be1bd
|
@ -2,7 +2,7 @@ use strict;
|
|||
use Cwd;
|
||||
use Setup;
|
||||
|
||||
(my $datadir, my $pgsql) = test_init();
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
|
|
@ -3,7 +3,7 @@ use strict;
|
|||
use Cwd;
|
||||
use Setup;
|
||||
|
||||
(my $datadir, my $pgsql) = test_init();
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
|
|
@ -2,7 +2,7 @@ use strict;
|
|||
use Cwd;
|
||||
use Setup;
|
||||
|
||||
(my $datadir, my $pgsql) = test_init();
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
|
|
@ -62,7 +62,10 @@ sub test_init {
|
|||
);
|
||||
$ENV{'HYDRA_DBI'} = $pgsql->dsn;
|
||||
system("hydra-init") == 0 or die;
|
||||
return ($dir, $pgsql);
|
||||
return (
|
||||
tmpdir => $dir,
|
||||
db => $pgsql
|
||||
);
|
||||
}
|
||||
|
||||
sub captureStdoutStderr {
|
||||
|
|
|
@ -5,7 +5,7 @@ use Cwd;
|
|||
use JSON;
|
||||
use Setup;
|
||||
|
||||
(my $datadir, my $pgsql) = test_init(
|
||||
my %ctx = test_init(
|
||||
hydra_config => q|
|
||||
<runcommand>
|
||||
command = cp "$HYDRA_JSON" "$HYDRA_DATA/joboutput.json"
|
||||
|
|
Loading…
Reference in a new issue