Commit cd96ca32 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Moved more things to Hive::Utils::Test

parent 456ad9d8
...@@ -6,6 +6,14 @@ use warnings; ...@@ -6,6 +6,14 @@ use warnings;
use Exporter; use Exporter;
use Carp qw{croak}; use Carp qw{croak};
use Cwd qw{getcwd};
BEGIN {
$ENV{'USER'} ||= (getpwuid($<))[7];
$ENV{'EHIVE_USER'} = $ENV{'USER'};
$ENV{'EHIVE_PASS'} ||= 'password';
$ENV{'EHIVE_ROOT_DIR'} = getcwd();
}
our @ISA = qw(Exporter); our @ISA = qw(Exporter);
......
...@@ -4,8 +4,6 @@ use warnings; ...@@ -4,8 +4,6 @@ use warnings;
use Bio::EnsEMBL::Hive::Utils::Test qw(spurt); use Bio::EnsEMBL::Hive::Utils::Test qw(spurt);
use lib 't/lib/';
use Hive::Config;
use File::Spec::Functions qw{catdir}; use File::Spec::Functions qw{catdir};
use File::Temp qw{tempdir}; use File::Temp qw{tempdir};
use Test::More; use Test::More;
......
...@@ -3,6 +3,9 @@ package Hive::Test::SystemCmd; ...@@ -3,6 +3,9 @@ package Hive::Test::SystemCmd;
use strict; use strict;
use warnings; use warnings;
use Bio::EnsEMBL::Hive::Utils::Test;
use lib 't/lib/'; use lib 't/lib/';
use base qw{Hive::Config}; use base qw{Hive::Config};
......
package Hive::Config; package Hive::Config;
use Cwd qw{getcwd}; use strict;
use warnings;
BEGIN {
$ENV{'USER'} ||= (getpwuid($<))[7];
$ENV{'EHIVE_USER'} = $ENV{'USER'};
$ENV{'EHIVE_PASS'} ||= 'password';
$ENV{'EHIVE_ROOT_DIR'} = getcwd();
}
use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor; use Bio::EnsEMBL::Hive::DBSQL::DBAdaptor;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment