File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
services/web/server/tests/unit/with_dbs/03 Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1313from pytest_simcore .helpers .monkeypatch_envs import setenvs_from_dict
1414from pytest_simcore .helpers .typing_env import EnvVarsDict
1515from pytest_simcore .openapi_specs import Entrypoint
16+ from simcore_service_webserver ._meta import API_VTAG
1617from simcore_service_webserver .application import create_application
1718from simcore_service_webserver .application_settings import get_application_settings
1819from simcore_service_webserver .rest ._utils import get_openapi_specs_path
@@ -75,7 +76,16 @@ def test_app_named_resources_against_openapi_specs(
7576 openapi_specs_entrypoints : set [Entrypoint ],
7677 app_rest_entrypoints : set [Entrypoint ],
7778):
78- assert app_rest_entrypoints == openapi_specs_entrypoints
79+ # remove task-legacy routes. These should not be exposed.
80+ # this test compares directly against the openapi specs. In future it would be
81+ # cleaner to compare against the fastapi app entry points in specs and
82+ # avoid including the endpoints there
83+ required_entry_points = {
84+ e
85+ for e in app_rest_entrypoints
86+ if not e .path .startswith (f"/{ API_VTAG } /tasks-legacy" )
87+ }
88+ assert required_entry_points == openapi_specs_entrypoints
7989
8090 # NOTE: missing here is:
8191 # - input schemas (path, query and body)
You can’t perform that action at this time.
0 commit comments