Open havardf opened 1 week ago
======================================== ERRORS =========================================
___________________________ ERROR collecting sedr/schemat.py ____________________________
venv/lib/python3.12/site-packages/schemathesis/extra/pytest_plugin.py:222: in collect
fail_on_no_matches(self.nodeid)
venv/lib/python3.12/site-packages/schemathesis/utils.py:43: in fail_on_no_matches
pytest.fail(f"Test function {node_id} does not match any API operations and therefore has no effect")
E Failed: Test function sedr/schemat.py::test_edr_conformance does not match any API operations and therefore has no effect
================================ short test summary info ================================
ERROR sedr/schemat.py::test_edr_conformance - Failed: Test function sedr/schemat.py::test_edr_conformance does not match any API o...
!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!
=================================== 1 error in 2.10s ====================================
Tried your fix. Doesn't seem to be as simple as that. Will attempt to join the url properly to not have repeat slashes.
Check if tag v0.7.6-1 fixes this problem, please.
docker run -it --rm ghcr.io/metno/sedr:0.7.6-1 --url ...
Today filters like
@schema.include(path_regex="^" + util.args.base_path + "conformance").parametrize()
could fail to work when the OpenAPI document for the service includes a server block with url likehttps://edr.example.com/foo
.The filters will only work when the base_path is
/
.The best fix is not entirely obvious since these hardcoded include paths need to match correctly with how the schemathesis builds up the absolute paths from paths + server urls in the openapi document.
But the above example will work if the filter was changed to:
@schema.include(path_regex="^" + util.args.base_path + "/conformance").parametrize()