Unverified Commit 16237bfe authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

use small stations database for some tests

parent 0702a0ed
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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',
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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;
Loading