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 Cwd;
|
||||||
use Setup;
|
use Setup;
|
||||||
|
|
||||||
(my $datadir, my $pgsql) = test_init();
|
my %ctx = test_init();
|
||||||
|
|
||||||
require Hydra::Schema;
|
require Hydra::Schema;
|
||||||
require Hydra::Model::DB;
|
require Hydra::Model::DB;
|
||||||
|
|
|
@ -3,7 +3,7 @@ use strict;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use Setup;
|
use Setup;
|
||||||
|
|
||||||
(my $datadir, my $pgsql) = test_init();
|
my %ctx = test_init();
|
||||||
|
|
||||||
require Hydra::Schema;
|
require Hydra::Schema;
|
||||||
require Hydra::Model::DB;
|
require Hydra::Model::DB;
|
||||||
|
|
|
@ -2,7 +2,7 @@ use strict;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
use Setup;
|
use Setup;
|
||||||
|
|
||||||
(my $datadir, my $pgsql) = test_init();
|
my %ctx = test_init();
|
||||||
|
|
||||||
require Hydra::Schema;
|
require Hydra::Schema;
|
||||||
require Hydra::Model::DB;
|
require Hydra::Model::DB;
|
||||||
|
|
|
@ -62,7 +62,10 @@ sub test_init {
|
||||||
);
|
);
|
||||||
$ENV{'HYDRA_DBI'} = $pgsql->dsn;
|
$ENV{'HYDRA_DBI'} = $pgsql->dsn;
|
||||||
system("hydra-init") == 0 or die;
|
system("hydra-init") == 0 or die;
|
||||||
return ($dir, $pgsql);
|
return (
|
||||||
|
tmpdir => $dir,
|
||||||
|
db => $pgsql
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub captureStdoutStderr {
|
sub captureStdoutStderr {
|
||||||
|
|
|
@ -5,7 +5,7 @@ use Cwd;
|
||||||
use JSON;
|
use JSON;
|
||||||
use Setup;
|
use Setup;
|
||||||
|
|
||||||
(my $datadir, my $pgsql) = test_init(
|
my %ctx = test_init(
|
||||||
hydra_config => q|
|
hydra_config => q|
|
||||||
<runcommand>
|
<runcommand>
|
||||||
command = cp "$HYDRA_JSON" "$HYDRA_DATA/joboutput.json"
|
command = cp "$HYDRA_JSON" "$HYDRA_DATA/joboutput.json"
|
||||||
|
|
Loading…
Reference in a new issue