Skip to content

[test] extent tests, coverage and harden responses#52

Open
herostrat wants to merge 1 commit intoSignalK:masterfrom
herostrat:test-upgrade
Open

[test] extent tests, coverage and harden responses#52
herostrat wants to merge 1 commit intoSignalK:masterfrom
herostrat:test-upgrade

Conversation

@herostrat
Copy link

@herostrat herostrat commented Feb 5, 2026

In preparation of new features I experiment with I decided to upgrade the tests

I think I found also found and fixed some inconsistencies:
Filesystem tile serving now validates the tile format and ensures the target path is a readable, regular file before serving. If not, it returns 404.
MBTiles serving also validates the tile format and returns 404 for unsupported formats.
The empty-chart scenario no longer yields false positives: resources may be missing, but any tile request returns 404.

The API serves individual tiles, not containers. When a tile is missing, unreadable, out of range, or in an unsupported format, the client should receive a clear “not found” response. This prevents accidental 200s for invalid paths or files and avoids leaking unintended filesystem content.

So I added integration tests for unsupported formats, unreadable tiles, invalid parameters, out-of-range zoom, and out-of-range tile coordinates.

Note: the new tests were primarily created with the help of AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant