`bundle exec rake test` (minitest, a default gem but pinned in Gemfile for reproducibility) now covers what ad-hoc scripts kept re-verifying by hand during development: Gpx/Fit/TrackStats parsing, GpxStore/LiveTrackStore file/TTL logic, LiveTrackClient's payload parsing, and app.rb's routes end to end via Rack::MockRequest. MAPTOOL_DATA_DIR (new, app.rb) lets the suite point GPX_STORE/ LIVETRACK_STORE at a throwaway directory instead of real data/ — without it every run would leave uploaded test files behind. Each lib file's old `if __FILE__ == $0` self-check is now redundant with real tests covering the same ground, so removed rather than kept as a second copy of the same assertions. Wired into ci.yml so it isn't just a local convenience.
27 lines
700 B
XML
27 lines
700 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<gpx version="1.1" creator="test">
|
|
<wpt lat="48.1" lon="17.2">
|
|
<ele>200</ele>
|
|
<name>Start</name>
|
|
<desc>Trailhead, see https://example.com/trail for details</desc>
|
|
<time>2026-01-01T09:00:00Z</time>
|
|
</wpt>
|
|
<trk>
|
|
<name>Morning Loop</name>
|
|
<trkseg>
|
|
<trkpt lat="48.1" lon="17.2">
|
|
<ele>200</ele>
|
|
<time>2026-01-01T09:00:00Z</time>
|
|
</trkpt>
|
|
<trkpt lat="48.101" lon="17.201">
|
|
<ele>250</ele>
|
|
<time>2026-01-01T09:10:00Z</time>
|
|
</trkpt>
|
|
<trkpt lat="48.102" lon="17.202">
|
|
<ele>230</ele>
|
|
<time>2026-01-01T09:20:00Z</time>
|
|
</trkpt>
|
|
</trkseg>
|
|
</trk>
|
|
</gpx>
|