osm-fr / osmose-backend

Part of osmose that runs the analysis, and send the results to the frontend.
GNU General Public License v3.0
92 stars 115 forks source link

Running tests requires some special setup #1074

Closed matkoniecz closed 3 years ago

matkoniecz commented 3 years ago

Thanks for https://github.com/osm-fr/osmose-backend/commit/e8801bebb1230f9cd15ec817d59f045ac3990b37 !

Sadly, I am still missing something, as tests apparently require /data:

================================================================================== short test summary info ==================================================================================
FAILED analysers/analyser_sax.py::TestAnalyserOsmosis::test - PermissionError: [Errno 13] Permission denied: '/data'
FAILED analysers/analyser_sax.py::TestAnalyserOsmosis::test_FR - PermissionError: [Errno 13] Permission denied: '/data'
FAILED analysers/analyser_sax.py::TestAnalyserOsmosis::test_fr - PermissionError: [Errno 13] Permission denied: '/data'
FAILED analysers/analyser_sax.py::TestAnalyserOsmosis::test_fr_nl - PermissionError: [Errno 13] Permission denied: '/data'
FAILED analysers/analyser_sax.py::TestAnalyserOsmosis::test_resume - PermissionError: [Errno 13] Permission denied: '/data'
FAILED analysers/analyser_sax.py::TestAnalyserOsmosis::test_resume_empty - PermissionError: [Errno 13] Permission denied: '/data'
FAILED analysers/analyser_sax.py::TestAnalyserOsmosis::test_resume_full - PermissionError: [Errno 13] Permission denied: '/data'
===================================================================================== 7 failed in 2.16s =====================================================================================

is there some setup process that I missed?

frodrigo commented 3 years ago

You can use Docker for a quick working dev env. You can also change this dir in the config https://github.com/osm-fr/osmose-backend/blob/master/modules/config.py#L32