[Tile-serving] [openstreetmap/osm2pgsql] Add an example test for the geometries.lua file (#1131)
Paul Norman
notifications at github.com
Sun Apr 19 10:46:50 UTC 2020
Brief thoughts before bed:
> Thanks for tackling the testing issue. I haven't moved on this a lot because I am not sure yet how to best test the Lua configs. As you have seen yourself, mocking out the `osm2pgsql` object isn't easy and it is unclear how far this helps us. I think we'll probably have to test actual runs of osm2pgsql with specially grafted data files. But the problem then is checking that the right data ends up in the right places in the database which is rather cumbersome with the current setup.
Maybe we can look at test practices from games which use Lua? There's a few games out there that allow complicated expansions of functionality with Lua and supply objects and functions with complicated interactions.
> I am not sure it makes much sense to test `geometries.lua`. The files in `flex-config` are intended as part of the documentation, not actual configs people should use. They are simplistic on purpose. We should probably run them in the course of some regression tests to make sure they do not fail completely. But testing every tiny aspect of them isn't really necessary in my opinion.
I think they're worth having tests for for two reasons. The first is that we should be showing how to test alongside how to do. We could skip everything but the C transform replacement for this. The second reason, and why I want to test this file is I want to start with simpler tests.
I want to start by figuring out how to test `geometries.lua` and the other example config files before tackling default-config.lua and compatible.lua.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1131#issuecomment-616101185
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200419/b720aa33/attachment-0001.htm>
More information about the Tile-serving
mailing list