use small stations database for some tests
This commit is contained in:
parent
0702a0edca
commit
16237bfe21
7 changed files with 14 additions and 0 deletions
|
@ -1658,6 +1658,11 @@ sub sync_stations {
|
|||
my $count = 0;
|
||||
for my $s ( Travel::Status::DE::IRIS::Stations::get_stations() ) {
|
||||
my ( $ds100, $name, $eva, $lon, $lat ) = @{$s};
|
||||
if ( $ENV{__TRAVELYNX_TEST_MINI_IRIS}
|
||||
and ( $eva < 8000000 or $eva > 8000100 ) )
|
||||
{
|
||||
next;
|
||||
}
|
||||
$db->insert(
|
||||
'stations',
|
||||
{
|
||||
|
@ -1708,6 +1713,9 @@ sub sync_stations {
|
|||
say 'Updating archived stations ...';
|
||||
my $old_stations
|
||||
= JSON->new->utf8->decode( scalar read_file('share/old_stations.json') );
|
||||
if ( $ENV{__TRAVELYNX_TEST_MINI_IRIS} ) {
|
||||
$old_stations = [];
|
||||
}
|
||||
for my $s ( @{$old_stations} ) {
|
||||
$db->insert(
|
||||
'stations',
|
||||
|
|
|
@ -33,6 +33,7 @@ $t->app->pg->on(
|
|||
|
||||
$t->app->config->{mail}->{disabled} = 1;
|
||||
|
||||
$ENV{__TRAVELYNX_TEST_MINI_IRIS} = 1;
|
||||
$t->app->start( 'database', 'migrate' );
|
||||
|
||||
my $csrf_token
|
||||
|
|
|
@ -33,6 +33,7 @@ $t->app->pg->on(
|
|||
|
||||
$t->app->config->{mail}->{disabled} = 1;
|
||||
|
||||
$ENV{__TRAVELYNX_TEST_MINI_IRIS} = 0;
|
||||
$t->app->start( 'database', 'migrate' );
|
||||
|
||||
my $csrf_token
|
||||
|
|
|
@ -35,6 +35,7 @@ $t->app->pg->on(
|
|||
|
||||
$t->app->config->{mail}->{disabled} = 1;
|
||||
|
||||
$ENV{__TRAVELYNX_TEST_MINI_IRIS} = 0;
|
||||
$t->app->start( 'database', 'migrate' );
|
||||
|
||||
my $csrf_token
|
||||
|
|
|
@ -33,6 +33,7 @@ $t->app->pg->on(
|
|||
|
||||
$t->app->config->{mail}->{disabled} = 1;
|
||||
|
||||
$ENV{__TRAVELYNX_TEST_MINI_IRIS} = 1;
|
||||
$t->app->start( 'database', 'migrate' );
|
||||
|
||||
my $u = $t->app->users;
|
||||
|
|
|
@ -36,6 +36,7 @@ $t->app->pg->on(
|
|||
|
||||
$t->app->config->{mail}->{disabled} = 1;
|
||||
|
||||
$ENV{__TRAVELYNX_TEST_MINI_IRIS} = 1;
|
||||
$t->app->start( 'database', 'migrate' );
|
||||
|
||||
my $u = $t->app->users;
|
||||
|
|
|
@ -34,6 +34,7 @@ $t->app->pg->on(
|
|||
|
||||
$t->app->config->{mail}->{disabled} = 1;
|
||||
|
||||
$ENV{__TRAVELYNX_TEST_MINI_IRIS} = 0;
|
||||
$t->app->start( 'database', 'migrate' );
|
||||
|
||||
my $csrf_token
|
||||
|
|
Loading…
Reference in a new issue