Skip to content

Commit 105b498

Browse files
committed
Revert "fix webserver openapi test"
This reverts commit 52a97f2.
1 parent 52a97f2 commit 105b498

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

services/web/server/tests/unit/with_dbs/03/test__openapi_specs.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from pytest_simcore.helpers.monkeypatch_envs import setenvs_from_dict
1414
from pytest_simcore.helpers.typing_env import EnvVarsDict
1515
from pytest_simcore.openapi_specs import Entrypoint
16+
from simcore_service_webserver._meta import API_VTAG
1617
from simcore_service_webserver.application import create_application
1718
from simcore_service_webserver.application_settings import get_application_settings
1819
from 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)

0 commit comments

Comments
 (0)