diff options
| author | Derf Null <derf@finalrewind.org> | 2023-06-26 20:18:27 +0200 | 
|---|---|---|
| committer | Derf Null <derf@finalrewind.org> | 2023-06-26 20:18:27 +0200 | 
| commit | 16237bfe213de6141d8100402f88ad6686394580 (patch) | |
| tree | 8916b60b8e83da31b468c48d35f96194fbf5301c /lib/Travelynx/Command | |
| parent | 0702a0edca47bef27e8beeac0aad5f7a5da4f14c (diff) | |
use small stations database for some tests
Diffstat (limited to 'lib/Travelynx/Command')
| -rw-r--r-- | lib/Travelynx/Command/database.pm | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm index 339fd42..d15330d 100644 --- a/lib/Travelynx/Command/database.pm +++ b/lib/Travelynx/Command/database.pm @@ -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',  | 
