Skip to content

Commit b1167a2

Browse files
committed
fix tests: use testFile2.gpx for correcting elevations, the other one had invalid coords
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent e0cb88c commit b1167a2

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/Service/SRTMGeoTIFFReader.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
namespace OCA\GpxPod\Service;
1313

14+
use Exception;
1415
use OCA\GpxPod\AppInfo\Application;
1516
use OCP\Files\SimpleFS\ISimpleFolder;
1617
use Psr\Log\LoggerInterface;
@@ -617,9 +618,9 @@ private function handleError($method, $message) {
617618
// var_dump($this);
618619
$dump = ob_get_contents();
619620
ob_end_clean();
620-
die("Died: error in $method: $message <pre>$dump</pre>");
621+
throw new Exception("Error in $method: $message <pre>$dump</pre>");
621622
} else {
622-
die();
623+
throw new Exception('Unknown error');
623624
}
624625
}
625626
}

tests/php/controller/pageControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ public function testCutTrack() {
657657
}
658658

659659
public function testProcessTrackElevations() {
660-
$dirsByPath = $this->setupSingleTrackTest(['testFile1.gpx']);
660+
$dirsByPath = $this->setupSingleTrackTest(['testFile2.gpx']);
661661

662662
$resp = $this->pageController->getTrackMarkersJson($dirsByPath['/']['id'], '/', false);
663663
$tracks = $resp->getData()['tracks'];

0 commit comments

Comments
 (0)