[Tile-serving] [openstreetmap/osm2pgsql] Use catch framework for testing (#966)
Sarah Hoffmann
notifications at github.com
Mon Nov 11 23:23:06 UTC 2019
This PR adds [Catch2](https://github.com/catchorg/Catch2/) to the project and ports all tests to use it instead of hand-crafted asserts. Some of the tests are heavily refactored, in particular, the node store and middle tests. They should still cover the same ground as before. There are also new tests for the new db-copy classes and the gazetteer backend.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/966
-- Commit Summary --
* initial tests with catch
* start tests for middle
* more tests for gazetteer output
* add catch test for persistent cache
* add tests for ram cache
* create a directory for test data
* update catch to 2.9
* move test options to catch
* move database option tests to catch
* rewrite projection option test
* add pgsql output tests
* rewrite basic pgsql output test in catch
* port test_output_pgsql-area to catch
* port int4 tests to catch
* port schema tests to catch
* move tablespace test to catch
* port two remaining output-pgsql tests to catch
* reorganise options for testing
* port parsing tests to catch
* port trivial tests for multi backend to catch
* port multi output type tests to catch
* port expiry code to catch
* port remaining output tests to catch
* remove already ported middle tests
* remove old test boiler plates
* move regression tests to new catch directory
* move new tests into place
* adapt paths in cmake for new layout
* clang-format tests
* fix remaining path issues
* fix paths in regression script
-- File Changes --
M node-ram-cache.cpp (9)
M tests/CMakeLists.txt (85)
A tests/catch-main.cpp (2)
A tests/catch.hpp (16864)
D tests/common-cleanup.cpp (21)
M tests/common-cleanup.hpp (46)
A tests/common-import.hpp (145)
A tests/common-options.hpp (85)
D tests/common-pg.cpp (271)
M tests/common-pg.hpp (246)
D tests/common.hpp (48)
R tests/data/000466354.osc.gz (0)
R tests/data/008-ch.osc.gz (0)
R tests/data/gazetteer-test.style (0)
R tests/data/hstore-match-only.osm (0)
R tests/data/hstore-match-only.style (0)
R tests/data/liechtenstein-2013-08-03.osm.pbf (0)
R tests/data/test_multipolygon.osm (0)
R tests/data/test_multipolygon_diff.osc (0)
R tests/data/test_multipolygon_postdiff.osm (0)
R tests/data/test_output_multi_line_storage.osm (0)
R tests/data/test_output_multi_line_trivial.lua (0)
R tests/data/test_output_multi_line_trivial.style.json (2)
R tests/data/test_output_multi_poly_trivial.lua (0)
R tests/data/test_output_multi_poly_trivial.osm (0)
R tests/data/test_output_multi_poly_trivial.style.json (2)
R tests/data/test_output_multi_tags.json (12)
R tests/data/test_output_multi_tags.lua (0)
R tests/data/test_output_multi_tags.osm (0)
R tests/data/test_output_pgsql_area.osm (0)
R tests/data/test_output_pgsql_int4.osm (0)
R tests/data/test_output_pgsql_int4.style (0)
R tests/data/test_output_pgsql_route_rel.osm (0)
R tests/data/test_output_pgsql_validgeom.osm (0)
R tests/data/test_output_pgsql_way_area.osm (0)
R tests/data/test_output_pgsql_z_order.osm (0)
D tests/middle-tests.hpp (324)
D tests/mockups.hpp (82)
M tests/regression-test.py (12)
M tests/regression-test.sh (2)
A tests/test-db-copy-mgr.cpp (192)
A tests/test-db-copy-thread.cpp (139)
M tests/test-expire-tiles.cpp (544)
D tests/test-hstore-match-only.cpp (88)
D tests/test-middle-flat.cpp (113)
D tests/test-middle-pgsql.cpp (97)
D tests/test-middle-ram.cpp (76)
A tests/test-middle.cpp (235)
M tests/test-options-database.cpp (71)
M tests/test-options-parse.cpp (348)
M tests/test-options-projection.cpp (153)
A tests/test-output-gazetteer.cpp (82)
M tests/test-output-multi-line-storage.cpp (87)
M tests/test-output-multi-line.cpp (135)
M tests/test-output-multi-point-multi-table.cpp (139)
M tests/test-output-multi-point.cpp (107)
M tests/test-output-multi-poly-trivial.cpp (127)
M tests/test-output-multi-polygon.cpp (138)
M tests/test-output-multi-tags.cpp (140)
M tests/test-output-pgsql-area.cpp (126)
A tests/test-output-pgsql-hstore-match-only.cpp (41)
M tests/test-output-pgsql-int4.cpp (168)
M tests/test-output-pgsql-schema.cpp (143)
M tests/test-output-pgsql-tablespace.cpp (111)
M tests/test-output-pgsql-validgeom.cpp (105)
M tests/test-output-pgsql-z_order.cpp (110)
M tests/test-output-pgsql.cpp (344)
D tests/test-parse-diff.cpp (130)
D tests/test-parse-extra-args.cpp (114)
A tests/test-parse-osmium.cpp (233)
D tests/test-parse-xml2.cpp (108)
A tests/test-persistent-cache.cpp (93)
D tests/test-persistent-node-cache.cpp (119)
A tests/test-ram-cache.cpp (119)
M tests/test-wildcard-match.cpp (80)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/966.patch
https://github.com/openstreetmap/osm2pgsql/pull/966.diff
--
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/966
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20191111/f46f2754/attachment.html>
More information about the Tile-serving
mailing list