From b3094f7682e55b51f6e2d0293878dcc775ec1317 Mon Sep 17 00:00:00 2001 From: matusdrobuliak66 Date: Thu, 12 Jun 2025 10:38:45 +0200 Subject: [PATCH 1/5] remove listing user services call from listing project --- .../projects/_crud_api_read.py | 11 ----------- .../projects/_projects_repository_legacy.py | 3 --- .../_projects_repository_legacy_utils.py | 19 +------------------ 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/services/web/server/src/simcore_service_webserver/projects/_crud_api_read.py b/services/web/server/src/simcore_service_webserver/projects/_crud_api_read.py index d8931c5da8c1..b1775f88b65f 100644 --- a/services/web/server/src/simcore_service_webserver/projects/_crud_api_read.py +++ b/services/web/server/src/simcore_service_webserver/projects/_crud_api_read.py @@ -22,7 +22,6 @@ ) from simcore_postgres_database.webserver_models import ProjectType as ProjectTypeDB -from ..catalog import catalog_service from ..folders import _folders_repository from ..workspaces.api import check_user_workspace_access from . import _projects_service @@ -120,10 +119,6 @@ async def list_projects( # pylint: disable=too-many-arguments ) -> tuple[list[ProjectDict], int]: db = ProjectDBAPI.get_from_app_context(app) - user_available_services = await catalog_service.get_services_for_user_in_product( - app, user_id=user_id, product_name=product_name - ) - workspace_is_private = True if workspace_id: await check_user_workspace_access( @@ -165,7 +160,6 @@ async def list_projects( # pylint: disable=too-many-arguments filter_by_template_type=( ProjectTemplateTypeDB(template_type) if template_type else None ), - filter_by_services=user_available_services, filter_trashed=trashed, filter_hidden=show_hidden, # composed attrs @@ -202,17 +196,12 @@ async def list_projects_full_depth( ) -> tuple[list[ProjectDict], int]: db = ProjectDBAPI.get_from_app_context(app) - user_available_services = await catalog_service.get_services_for_user_in_product( - app, user_id=user_id, product_name=product_name - ) - db_projects, db_project_types, total_number_projects = await db.list_projects_dicts( product_name=product_name, user_id=user_id, workspace_query=WorkspaceQuery(workspace_scope=WorkspaceScope.ALL), folder_query=FolderQuery(folder_scope=FolderScope.ALL), filter_trashed=trashed, - filter_by_services=user_available_services, filter_by_project_type=ProjectType.STANDARD, search_by_multi_columns=search_by_multi_columns, search_by_project_name=search_by_project_name, diff --git a/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy.py b/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy.py index 0ed76cf44b22..ee92f5d79e9f 100644 --- a/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy.py +++ b/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy.py @@ -573,7 +573,6 @@ async def list_projects_dicts( # pylint: disable=too-many-arguments,too-many-st # attribute filters filter_by_project_type: ProjectType | None = None, filter_by_template_type: ProjectTemplateType | None = None, - filter_by_services: list[dict] | None = None, filter_published: bool | None = None, filter_hidden: bool | None = False, filter_trashed: bool | None = False, @@ -670,9 +669,7 @@ async def list_projects_dicts( # pylint: disable=too-many-arguments,too-many-st prjs, prj_types = await self._execute_without_permission_check( conn, - user_id=user_id, select_projects_query=combined_query.offset(offset).limit(limit), - filter_by_services=filter_by_services, ) return ( diff --git a/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy_utils.py b/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy_utils.py index bc38625255e6..0ff06f4ec0e2 100644 --- a/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy_utils.py +++ b/services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy_utils.py @@ -12,11 +12,9 @@ from models_library.projects import ProjectAtDB, ProjectID, ProjectTemplateType from models_library.projects_nodes import Node from models_library.projects_nodes_io import NodeIDStr -from models_library.users import UserID from models_library.utils.change_case import camel_to_snake, snake_to_camel from pydantic import ValidationError from simcore_postgres_database.models.project_to_groups import project_to_groups -from simcore_postgres_database.models.projects_to_products import projects_to_products from simcore_postgres_database.webserver_models import ProjectType, projects from sqlalchemy.dialects.postgresql import insert as pg_insert from sqlalchemy.sql.selectable import CompoundSelect, Select @@ -32,7 +30,7 @@ ProjectNotFoundError, ) from .models import ProjectDict -from .utils import are_project_services_available, find_changed_node_keys +from .utils import find_changed_node_keys logger = logging.getLogger(__name__) @@ -189,10 +187,8 @@ async def _upsert_tags_in_project( async def _execute_without_permission_check( self, conn: SAConnection, - user_id: UserID, *, select_projects_query: Select | CompoundSelect, - filter_by_services: list[dict] | None = None, ) -> tuple[list[dict[str, Any]], list[ProjectType]]: api_projects: list[dict] = [] # API model-compatible projects db_projects: list[dict] = [] # DB model-compatible projects @@ -218,19 +214,6 @@ async def _execute_without_permission_check( prj: dict[str, Any] = dict(row.items()) prj.pop("product_name", None) - if ( - filter_by_services is not None - # This checks only old projects that are not in the projects_to_products table. - and row[projects_to_products.c.product_name] is None - and not are_project_services_available(prj, filter_by_services) - ): - logger.warning( - "Project %s will not be listed for user %s since it has no access rights" - " for one or more of the services that includes.", - f"{row.id=}", - f"{user_id=}", - ) - continue db_projects.append(prj) # NOTE: DO NOT nest _get_tags_by_project in async loop above !!! From 0bc92ea2f53115ac64e4564300745609533e9e9d Mon Sep 17 00:00:00 2001 From: matusdrobuliak66 Date: Thu, 12 Jun 2025 10:55:22 +0200 Subject: [PATCH 2/5] remove listing user services from get project --- .../projects/_controller/projects_rest.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/services/web/server/src/simcore_service_webserver/projects/_controller/projects_rest.py b/services/web/server/src/simcore_service_webserver/projects/_controller/projects_rest.py index f0ec884bc0ce..97b9e4380e28 100644 --- a/services/web/server/src/simcore_service_webserver/projects/_controller/projects_rest.py +++ b/services/web/server/src/simcore_service_webserver/projects/_controller/projects_rest.py @@ -28,7 +28,6 @@ from servicelib.redis import get_project_locked_state from ..._meta import API_VTAG as VTAG -from ...catalog import catalog_service from ...login.decorators import login_required from ...redis import get_redis_lock_manager_client_sdk from ...resource_manager.user_sessions import PROJECT_ID_KEY, managed_resource @@ -39,7 +38,6 @@ from .. import _crud_api_create, _crud_api_read, _projects_service from .._permalink_service import update_or_pop_permalink_in_project from ..models import ProjectDict -from ..utils import are_project_services_available, get_project_unavailable_services from . import _rest_utils from ._rest_exceptions import handle_plugin_requests_exceptions from ._rest_schemas import ( @@ -271,10 +269,6 @@ async def get_project(request: web.Request): req_ctx = AuthenticatedRequestContext.model_validate(request) path_params = parse_request_path_parameters_as(ProjectPathParams, request) - user_available_services = await catalog_service.get_services_for_user_in_product( - request.app, user_id=req_ctx.user_id, product_name=req_ctx.product_name - ) - project = await _projects_service.get_project_for_user( request.app, project_uuid=f"{path_params.project_id}", @@ -283,21 +277,6 @@ async def get_project(request: web.Request): include_trashed_by_primary_gid=True, ) - if not are_project_services_available(project, user_available_services): - unavilable_services = get_project_unavailable_services( - project, user_available_services - ) - formatted_services = ", ".join( - f"{service}:{version}" for service, version in unavilable_services - ) - # TODO: lack of permissions should be notified with https://httpstatuses.com/403 web.HTTPForbidden - raise web.HTTPNotFound( - reason=( - f"Project '{path_params.project_id}' uses unavailable services. Please ask " - f"for permission for the following services {formatted_services}" - ) - ) - # Adds permalink await update_or_pop_permalink_in_project(request, project) From f3f8b4887592a9b99ea8aa2054cb37dce4f8a4e5 Mon Sep 17 00:00:00 2001 From: matusdrobuliak66 Date: Thu, 12 Jun 2025 11:41:44 +0200 Subject: [PATCH 3/5] fix tests --- .../with_dbs/02/test_projects_cancellations.py | 8 -------- .../with_dbs/02/test_projects_crud_handlers.py | 14 -------------- .../02/test_projects_crud_handlers__delete.py | 1 - .../02/test_projects_crud_handlers__list.py | 3 --- .../with_dbs/02/test_projects_metadata_handlers.py | 4 ---- .../with_dbs/02/test_projects_states_handlers.py | 1 - .../tests/unit/with_dbs/03/tags/test_tags.py | 4 +--- .../tests/unit/with_dbs/03/trash/conftest.py | 12 ++++-------- .../unit/with_dbs/03/trash/test_trash_rest.py | 5 ----- .../test_studies_dispatcher_handlers.py | 2 -- .../test_studies_dispatcher_studies_access.py | 9 --------- 11 files changed, 5 insertions(+), 58 deletions(-) diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_cancellations.py b/services/web/server/tests/unit/with_dbs/02/test_projects_cancellations.py index 61353b6f624a..2e92800de642 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_cancellations.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_cancellations.py @@ -97,13 +97,11 @@ async def test_copying_large_project_and_aborting_correctly_removes_new_project( standard_groups: list[dict[str, str]], user_project: dict[str, Any], expected: ExpectedResponse, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], slow_storage_subsystem_mock: MockedStorageSubsystem, project_db_cleaner: None, mocked_dynamic_services_interface: dict[str, MagicMock], ): assert client.app - catalog_subsystem_mock([user_project]) # initiate a project copy that will last long (simulated by a long running storage) # POST /v0/projects create_url = client.app.router["create_project"].url_for() @@ -150,13 +148,11 @@ async def test_copying_large_project_and_retrieving_copy_task( standard_groups: list[dict[str, str]], user_project: dict[str, Any], expected: ExpectedResponse, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], slow_storage_subsystem_mock: MockedStorageSubsystem, project_db_cleaner: None, mocked_dynamic_services_interface: dict[str, MagicMock], ): assert client.app - catalog_subsystem_mock([user_project]) # initiate a project copy that will last long (simulated by a long running storage) # POST /v0/projects @@ -198,13 +194,11 @@ async def test_creating_new_project_from_template_without_copying_data_creates_s standard_groups: list[dict[str, str]], template_project: dict[str, Any], expected: ExpectedResponse, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], slow_storage_subsystem_mock: MockedStorageSubsystem, project_db_cleaner: None, request_create_project: Callable[..., Awaitable[ProjectDict]], ): assert client.app - catalog_subsystem_mock([template_project]) # create a project from another without copying data shall not call in the storage API # POST /v0/projects await request_create_project( @@ -249,13 +243,11 @@ async def test_creating_new_project_as_template_without_copying_data_creates_ske standard_groups: list[dict[str, str]], user_project: dict[str, Any], expected: ExpectedResponse, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], slow_storage_subsystem_mock: MockedStorageSubsystem, project_db_cleaner: None, request_create_project: Callable[..., Awaitable[ProjectDict]], ): assert client.app - catalog_subsystem_mock([user_project]) # create a project from another without copying data shall not call in the storage API # POST /v0/projects await request_create_project( diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers.py b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers.py index bc5e5d747810..0396f133bab6 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers.py @@ -194,10 +194,8 @@ async def test_list_projects( user_project: dict[str, Any], template_project: dict[str, Any], expected: HTTPStatus, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], director_v2_service_mock: aioresponses, ): - catalog_subsystem_mock([user_project, template_project]) data, *_ = await _list_and_assert_projects(client, expected) if data: @@ -344,7 +342,6 @@ async def test_list_projects_with_innaccessible_services( user_project: dict[str, Any], template_project: dict[str, Any], expected: HTTPStatus, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], director_v2_service_mock: aioresponses, postgres_db: sa.engine.Engine, s4l_product_headers: dict[str, Any], @@ -374,7 +371,6 @@ async def test_list_projects_with_innaccessible_services( # use-case 4: give user access to services # shall return the projects for any product - catalog_subsystem_mock([user_project, template_project]) data, *_ = await _list_and_assert_projects( client, expected, headers=s4l_product_headers ) @@ -403,10 +399,7 @@ async def test_get_project( user_project: ProjectDict, template_project: ProjectDict, expected, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], ): - catalog_subsystem_mock([user_project, template_project]) - # standard project await _assert_get_same_project(client, user_project, expected) @@ -444,7 +437,6 @@ async def test_create_get_and_patch_project_ui_field( logged_user: UserInfoDict, primary_group: dict[str, str], request_create_project: Callable[..., Awaitable[ProjectDict]], - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], project_db_cleaner, ): assert client.app @@ -462,8 +454,6 @@ async def test_create_get_and_patch_project_ui_field( ) project_id = new_project["uuid"] - catalog_subsystem_mock([new_project]) - # Step 2: Get the project and check the ui.icon url = client.app.router["get_project"].url_for(project_id=project_id) resp = await client.get(f"{url}") @@ -522,11 +512,9 @@ async def test_new_project_from_other_study( user_project: ProjectDict, expected: ExpectedResponse, storage_subsystem_mock, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], project_db_cleaner, request_create_project: Callable[..., Awaitable[ProjectDict]], ): - catalog_subsystem_mock([user_project]) new_project = await request_create_project( client, expected.accepted, @@ -608,7 +596,6 @@ async def test_new_template_from_project( user_project: dict[str, Any], expected: ExpectedResponse, storage_subsystem_mock: MockedStorageSubsystem, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], project_db_cleaner: None, request_create_project: Callable[..., Awaitable[ProjectDict]], ): @@ -625,7 +612,6 @@ async def test_new_template_from_project( if new_template_prj: template_project = new_template_prj - catalog_subsystem_mock([template_project]) templates, *_ = await _list_and_assert_projects( client, status.HTTP_200_OK, {"type": "template"} diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__delete.py b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__delete.py index 6dbcbe488ac0..674e4c6dd853 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__delete.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__delete.py @@ -61,7 +61,6 @@ async def test_delete_project( expected: ExpectedResponse, storage_subsystem_mock: MockedStorageSubsystem, mocked_dynamic_services_interface: dict[str, MagicMock], - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], fake_services: Callable[..., Awaitable[list[DynamicServiceGet]]], assert_get_same_project_caller: Callable, mock_dynamic_scheduler_rabbitmq: None, diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list.py b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list.py index d16058179be6..a65cd0ebe307 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list.py @@ -133,7 +133,6 @@ async def test_list_projects_with_invalid_pagination_parameters( primary_group: dict[str, str], expected: ExpectedResponse, storage_subsystem_mock, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], director_v2_service_mock: aioresponses, project_db_cleaner, limit: int, @@ -158,7 +157,6 @@ async def test_list_projects_with_pagination( primary_group: dict[str, str], expected: ExpectedResponse, storage_subsystem_mock, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], director_v2_service_mock: aioresponses, project_db_cleaner, limit: int, @@ -175,7 +173,6 @@ async def test_list_projects_with_pagination( ] ) if expected.created == status.HTTP_201_CREATED: - catalog_subsystem_mock(created_projects) assert len(created_projects) == NUM_PROJECTS NUMBER_OF_CALLS = ceil(NUM_PROJECTS / limit) diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_metadata_handlers.py b/services/web/server/tests/unit/with_dbs/02/test_projects_metadata_handlers.py index dae450a88fe7..314a3756513a 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_metadata_handlers.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_metadata_handlers.py @@ -122,12 +122,10 @@ async def test_new_project_with_parent_project_node( primary_group: dict[str, str], user_project: ProjectDict, expected: ExpectedResponse, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], request_create_project: Callable[..., Awaitable[ProjectDict]], aiopg_engine: aiopg.sa.Engine, ): """this is new way of setting parents by using request headers""" - catalog_subsystem_mock([user_project]) parent_project = await request_create_project( client, expected.accepted, @@ -199,13 +197,11 @@ async def test_new_project_with_invalid_parent_project_node( primary_group: dict[str, str], user_project: ProjectDict, expected: ExpectedResponse, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], request_create_project: Callable[..., Awaitable[ProjectDict]], aiopg_engine: aiopg.sa.Engine, faker: Faker, ): """this is new way of setting parents by using request headers""" - catalog_subsystem_mock([user_project]) parent_project = await request_create_project( client, expected.accepted, diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_states_handlers.py b/services/web/server/tests/unit/with_dbs/02/test_projects_states_handlers.py index 68f0c0dfe6e5..7968f682e926 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_states_handlers.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_states_handlers.py @@ -277,7 +277,6 @@ async def test_share_project( expected: ExpectedResponse, storage_subsystem_mock, mocked_dynamic_services_interface: dict[str, mock.Mock], - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], share_rights: dict, project_db_cleaner, request_create_project: Callable[..., Awaitable[ProjectDict]], diff --git a/services/web/server/tests/unit/with_dbs/03/tags/test_tags.py b/services/web/server/tests/unit/with_dbs/03/tags/test_tags.py index 323bd0e33755..f7f8ddd6333d 100644 --- a/services/web/server/tests/unit/with_dbs/03/tags/test_tags.py +++ b/services/web/server/tests/unit/with_dbs/03/tags/test_tags.py @@ -4,7 +4,7 @@ # pylint: disable=too-many-arguments -from collections.abc import AsyncIterator, Callable, Iterator +from collections.abc import AsyncIterator, Iterator from typing import Any import pytest @@ -52,9 +52,7 @@ async def test_tags_to_studies( client: TestClient, faker: Faker, user_project: ProjectDict, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], ): - catalog_subsystem_mock([user_project]) assert client.app # Add test tags diff --git a/services/web/server/tests/unit/with_dbs/03/trash/conftest.py b/services/web/server/tests/unit/with_dbs/03/trash/conftest.py index 5c742b12144d..6f1baeb3fd58 100644 --- a/services/web/server/tests/unit/with_dbs/03/trash/conftest.py +++ b/services/web/server/tests/unit/with_dbs/03/trash/conftest.py @@ -7,7 +7,7 @@ import logging -from collections.abc import AsyncIterable, Callable +from collections.abc import AsyncIterable from pathlib import Path import pytest @@ -72,19 +72,15 @@ async def other_user_project( @pytest.fixture def mocked_catalog( user_project: ProjectDict, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], -): - catalog_subsystem_mock([user_project]) +): ... @pytest.fixture -def mocked_director_v2(director_v2_service_mock: aioresponses): - ... +def mocked_director_v2(director_v2_service_mock: aioresponses): ... @pytest.fixture -def mocked_storage(storage_subsystem_mock: MockedStorageSubsystem): - ... +def mocked_storage(storage_subsystem_mock: MockedStorageSubsystem): ... @pytest.fixture diff --git a/services/web/server/tests/unit/with_dbs/03/trash/test_trash_rest.py b/services/web/server/tests/unit/with_dbs/03/trash/test_trash_rest.py index b3f66e0813f9..8f1083019b92 100644 --- a/services/web/server/tests/unit/with_dbs/03/trash/test_trash_rest.py +++ b/services/web/server/tests/unit/with_dbs/03/trash/test_trash_rest.py @@ -587,7 +587,6 @@ async def test_trash_workspace( workspace: WorkspaceGet, user_project: ProjectDict, fake_project: ProjectDict, - mocked_catalog: None, mocked_dynamic_services_interface: dict[str, MagicMock], postgres_db: sa.engine.Engine, ): @@ -843,7 +842,6 @@ async def test_trash_subfolder( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, - mocked_catalog: None, mocked_dynamic_services_interface: dict[str, MagicMock], ): assert client.app @@ -941,7 +939,6 @@ async def test_trash_project_in_subfolder( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, - mocked_catalog: None, mocked_dynamic_services_interface: dict[str, MagicMock], ): assert client.app @@ -1030,7 +1027,6 @@ async def test_trash_project_explitictly_and_empty_trash_bin( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, - mocked_catalog: None, mocked_director_v2: None, mocked_dynamic_services_interface: dict[str, MagicMock], mocked_storage: None, @@ -1088,7 +1084,6 @@ async def test_trash_folder_with_subfolder_and_project_and_empty_bin( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, - mocked_catalog: None, mocked_director_v2: None, mocked_dynamic_services_interface: dict[str, MagicMock], mocked_storage: None, diff --git a/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_handlers.py b/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_handlers.py index b2a885451602..1d0048636d2f 100644 --- a/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_handlers.py +++ b/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_handlers.py @@ -390,7 +390,6 @@ async def test_dispatch_study_anonymously( redirect_type: str, mocker: MockerFixture, storage_subsystem_mock, - catalog_subsystem_mock: None, mocks_on_projects_api, ): assert client.app @@ -456,7 +455,6 @@ async def test_dispatch_logged_in_user( mocker: MockerFixture, mock_dynamic_scheduler: None, storage_subsystem_mock, - catalog_subsystem_mock: None, mocks_on_projects_api: None, ): assert client.app diff --git a/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_studies_access.py b/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_studies_access.py index 6f4e923a203b..dfa99c7048e1 100644 --- a/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_studies_access.py +++ b/services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_studies_access.py @@ -299,15 +299,12 @@ async def test_access_study_anonymously( client: TestClient, published_project: ProjectDict, storage_subsystem_mock_override: None, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], mock_dynamic_scheduler: None, director_v2_service_mock: AioResponsesMock, mocks_on_projects_api: None, # needed to cleanup the locks between parametrizations redis_locks_client: AsyncIterator[aioredis.Redis], ): - catalog_subsystem_mock([published_project]) - assert not _is_user_authenticated(client.session), "Is anonymous" assert client.app study_url = client.app.router["get_redirection_to_study_page"].url_for( @@ -350,7 +347,6 @@ async def test_access_study_by_logged_user( logged_user: UserInfoDict, published_project: ProjectDict, storage_subsystem_mock_override: None, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], mock_dynamic_scheduler: None, director_v2_service_mock: AioResponsesMock, mocks_on_projects_api: None, @@ -359,7 +355,6 @@ async def test_access_study_by_logged_user( redis_locks_client: AsyncIterator[aioredis.Redis], ): assert client.app - catalog_subsystem_mock([published_project]) assert _is_user_authenticated(client.session), "Is already logged-in" study_url = client.app.router["get_redirection_to_study_page"].url_for( @@ -384,14 +379,12 @@ async def test_access_cookie_of_expired_user( client: TestClient, published_project: ProjectDict, storage_subsystem_mock_override: None, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], director_v2_service_mock: AioResponsesMock, mock_dynamic_scheduler: None, mocks_on_projects_api: None, # needed to cleanup the locks between parametrizations redis_locks_client: AsyncIterator[aioredis.Redis], ): - catalog_subsystem_mock([published_project]) # emulates issue #1570 assert client.app # nosec app: web.Application = client.app @@ -469,14 +462,12 @@ async def test_guest_user_is_not_garbage_collected( aiohttp_client: Callable, published_project: ProjectDict, storage_subsystem_mock_override: None, - catalog_subsystem_mock: Callable[[list[ProjectDict]], None], mock_dynamic_scheduler: None, director_v2_service_mock: AioResponsesMock, mocks_on_projects_api: None, # needed to cleanup the locks between parametrizations redis_locks_client: AsyncIterator[aioredis.Redis], ): - catalog_subsystem_mock([published_project]) ## NOTE: use pytest -s --log-cli-level=DEBUG to see GC logs async def _test_guest_user_workflow(request_index): From a37613b53b5115ef887ec670de61def21031b378 Mon Sep 17 00:00:00 2001 From: matusdrobuliak66 Date: Thu, 12 Jun 2025 13:18:22 +0200 Subject: [PATCH 4/5] fix tests --- .../projects/utils.py | 36 ------------------- ...s_crud_handlers__list_with_query_params.py | 14 -------- .../02/test_projects_crud_handlers__patch.py | 21 ----------- .../02/test_projects_groups_handlers.py | 28 --------------- .../02/test_projects_nodes_handlers__patch.py | 28 --------------- .../unit/with_dbs/04/folders/test_folders.py | 11 ------ .../unit/with_dbs/04/workspaces/conftest.py | 15 -------- .../with_dbs/04/workspaces/test_workspaces.py | 2 -- ...rkspaces__delete_workspace_with_content.py | 1 - ...t_workspaces__folders_and_projects_crud.py | 3 -- ...t_workspaces__list_projects_full_search.py | 3 -- ...aces__moving_folders_between_workspaces.py | 2 -- ...ces__moving_projects_between_workspaces.py | 5 --- 13 files changed, 169 deletions(-) diff --git a/services/web/server/src/simcore_service_webserver/projects/utils.py b/services/web/server/src/simcore_service_webserver/projects/utils.py index 7f9514812e70..93c19a823a41 100644 --- a/services/web/server/src/simcore_service_webserver/projects/utils.py +++ b/services/web/server/src/simcore_service_webserver/projects/utils.py @@ -189,42 +189,6 @@ def is_graph_equal( return True -def are_project_services_available( - project: dict[str, Any], available_services: list[dict[str, str]] -) -> bool: - if not project["workbench"]: - # empty project - return True - - # list services in project - needed_services = { - (srv["key"], srv["version"]) for _, srv in project["workbench"].items() - } - - # list available services - available_services_set = { - (srv["key"], srv["version"]) for srv in available_services - } - - return needed_services.issubset(available_services_set) - - -def get_project_unavailable_services( - project: dict[str, Any], available_services: list[dict[str, Any]] -) -> set[tuple[str, str]]: - # get project services - required: set[tuple[str, str]] = { - (s["key"], s["version"]) for _, s in project["workbench"].items() - } - - # get available services - available: set[tuple[str, str]] = { - (s["key"], s["version"]) for s in available_services - } - - return required - available - - def extract_dns_without_default_port(url: URL) -> str: port = "" if url.port == 80 else f":{url.port}" return f"{url.host}{port}" diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list_with_query_params.py b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list_with_query_params.py index 3e9b7ec0922b..252d9d7068b8 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list_with_query_params.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__list_with_query_params.py @@ -19,7 +19,6 @@ from models_library.projects import ProjectID, ProjectTemplateType from models_library.users import UserID from pydantic import BaseModel, PositiveInt -from pytest_mock import MockerFixture from pytest_simcore.helpers.assert_checks import assert_status from pytest_simcore.helpers.webserver_login import UserInfoDict from pytest_simcore.helpers.webserver_parametrizations import ( @@ -53,15 +52,6 @@ def standard_and_tester_user_roles() -> tuple[str, tuple[UserRole, ExpectedRespo ) -@pytest.fixture -def mock_catalog_api_get_services_for_user_in_product(mocker: MockerFixture): - mocker.patch( - "simcore_service_webserver.projects._crud_api_read.catalog_service.get_services_for_user_in_product", - spec=True, - return_value=[], - ) - - async def _new_project( client: TestClient, user_id: UserID, @@ -119,7 +109,6 @@ async def test_list_projects_with_search_parameter( tests_data_dir: Path, osparc_product_name: str, project_db_cleaner: None, - mock_catalog_api_get_services_for_user_in_product, ): projects_info = [ _ProjectInfo( @@ -309,7 +298,6 @@ async def test_list_projects_with_order_by_parameter( tests_data_dir: Path, osparc_product_name: str, project_db_cleaner: None, - mock_catalog_api_get_services_for_user_in_product: None, ): projects_info = [ _ProjectInfo( @@ -449,7 +437,6 @@ async def test_list_projects_for_specific_folder_id( tests_data_dir: Path, osparc_product_name: str, project_db_cleaner: None, - mock_catalog_api_get_services_for_user_in_product: None, setup_folders_db: FolderID, ): projects_info = [ @@ -532,7 +519,6 @@ async def test_list_and_patch_projects_with_template_type( tests_data_dir: Path, osparc_product_name: str, project_db_cleaner: None, - mock_catalog_api_get_services_for_user_in_product, ): projects_type = [ "STANDARD", diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__patch.py b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__patch.py index 195b6b9c4cc3..030e124e11f3 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__patch.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_crud_handlers__patch.py @@ -11,7 +11,6 @@ import pytest from aiohttp.test_utils import TestClient -from pytest_mock.plugin import MockerFixture from pytest_simcore.helpers.assert_checks import assert_status from pytest_simcore.helpers.webserver_login import UserInfoDict from servicelib.aiohttp import status @@ -22,24 +21,6 @@ API_PREFIX = "/" + api_version_prefix -@pytest.fixture -def mock_catalog_api_get_services_for_user_in_product(mocker: MockerFixture): - mocker.patch( - "simcore_service_webserver.projects._controller.projects_rest.catalog_service.get_services_for_user_in_product", - spec=True, - return_value=[], - ) - - -@pytest.fixture -def mock_are_project_services_available(mocker: MockerFixture): - mocker.patch( - "simcore_service_webserver.projects._controller.projects_rest.are_project_services_available", - spec=True, - return_value=True, - ) - - @pytest.mark.parametrize( "user_role,expected", [ @@ -81,8 +62,6 @@ async def test_patch_project( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product, - mock_are_project_services_available, ): assert client.app base_url = client.app.router["patch_project"].url_for( diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_groups_handlers.py b/services/web/server/tests/unit/with_dbs/02/test_projects_groups_handlers.py index 72aa178ecfcb..afee18029b61 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_groups_handlers.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_groups_handlers.py @@ -12,8 +12,6 @@ from models_library.api_schemas_webserver.projects_access_rights import ( ProjectShareAccepted, ) -from pytest_mock import MockType -from pytest_mock.plugin import MockerFixture from pytest_simcore.helpers.assert_checks import assert_status from pytest_simcore.helpers.webserver_login import NewUser, UserInfoDict from servicelib.aiohttp import status @@ -21,26 +19,6 @@ from simcore_service_webserver.projects.models import ProjectDict -@pytest.fixture -def mock_catalog_api_get_services_for_user_in_product( - mocker: MockerFixture, -) -> MockType: - return mocker.patch( - "simcore_service_webserver.projects._controller.projects_rest.catalog_service.get_services_for_user_in_product", - spec=True, - return_value=[], - ) - - -@pytest.fixture -def mock_are_project_services_available(mocker: MockerFixture) -> MockType: - return mocker.patch( - "simcore_service_webserver.projects._controller.projects_rest.are_project_services_available", - spec=True, - return_value=True, - ) - - @pytest.mark.acceptance_test( "Driving test for https://github.com/ITISFoundation/osparc-issues/issues/1547" ) @@ -50,8 +28,6 @@ async def test_projects_groups_full_workflow( # noqa: PLR0915 logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockType, - mock_are_project_services_available: MockType, ): assert client.app # check the default project permissions @@ -264,8 +240,6 @@ async def test_share_project( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, - mock_catalog_api_get_services_for_user_in_product: MockType, - mock_are_project_services_available: MockType, ): assert client.app @@ -332,8 +306,6 @@ async def test_share_project_with_roles( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, - mock_catalog_api_get_services_for_user_in_product: MockType, - mock_are_project_services_available: MockType, user_role: UserRole, expected_status: HTTPStatus, ): diff --git a/services/web/server/tests/unit/with_dbs/02/test_projects_nodes_handlers__patch.py b/services/web/server/tests/unit/with_dbs/02/test_projects_nodes_handlers__patch.py index cfbc1ecdcd19..c06b03ec07eb 100644 --- a/services/web/server/tests/unit/with_dbs/02/test_projects_nodes_handlers__patch.py +++ b/services/web/server/tests/unit/with_dbs/02/test_projects_nodes_handlers__patch.py @@ -26,24 +26,6 @@ API_PREFIX = "/" + api_version_prefix -@pytest.fixture -def mock_catalog_api_get_services_for_user_in_product(mocker: MockerFixture): - mocker.patch( - "simcore_service_webserver.projects._controller.projects_rest.catalog_service.get_services_for_user_in_product", - spec=True, - return_value=[], - ) - - -@pytest.fixture -def mock_are_project_services_available(mocker: MockerFixture): - mocker.patch( - "simcore_service_webserver.projects._controller.projects_rest.are_project_services_available", - spec=True, - return_value=True, - ) - - @pytest.fixture def mock_catalog_rpc_check_for_service(mocker: MockerFixture): mocker.patch( @@ -99,8 +81,6 @@ async def test_patch_project_node( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: None, - mock_are_project_services_available: None, mock_catalog_rpc_check_for_service: None, ): node_id = next(iter(user_project["workbench"])) @@ -221,8 +201,6 @@ async def test_patch_project_node_notifies( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product, - mock_are_project_services_available, mock_catalog_rpc_check_for_service, mocked_notify_project_node_update, ): @@ -257,8 +235,6 @@ async def test_patch_project_node_inputs_notifies( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product, - mock_are_project_services_available, mocked_notify_project_node_update, ): node_id = next(iter(user_project["workbench"])) @@ -297,8 +273,6 @@ async def test_patch_project_node_inputs_with_data_type_change( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product, - mock_are_project_services_available, ): node_id = next(iter(user_project["workbench"])) assert client.app @@ -350,8 +324,6 @@ async def test_patch_project_node_service_key_with_error( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product, - mock_are_project_services_available, mocker: MockerFixture, ): node_id = next(iter(user_project["workbench"])) diff --git a/services/web/server/tests/unit/with_dbs/04/folders/test_folders.py b/services/web/server/tests/unit/with_dbs/04/folders/test_folders.py index f7acc51f42d3..020958813dd8 100644 --- a/services/web/server/tests/unit/with_dbs/04/folders/test_folders.py +++ b/services/web/server/tests/unit/with_dbs/04/folders/test_folders.py @@ -269,22 +269,12 @@ async def test_project_folder_movement_full_workflow( await assert_status(resp, status.HTTP_204_NO_CONTENT) -@pytest.fixture -def mock_catalog_api_get_services_for_user_in_product(mocker: MockerFixture): - mocker.patch( - "simcore_service_webserver.projects._crud_api_read.catalog_service.get_services_for_user_in_product", - spec=True, - return_value=[], - ) - - @pytest.mark.parametrize("user_role,expected", [(UserRole.USER, status.HTTP_200_OK)]) async def test_project_listing_inside_of_private_folder( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, ): assert client.app @@ -404,7 +394,6 @@ async def test_folders_deletion( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, mock_storage_delete_data_folders: mock.Mock, ): assert client.app diff --git a/services/web/server/tests/unit/with_dbs/04/workspaces/conftest.py b/services/web/server/tests/unit/with_dbs/04/workspaces/conftest.py index 5ae933f8e9ef..fa008269aaff 100644 --- a/services/web/server/tests/unit/with_dbs/04/workspaces/conftest.py +++ b/services/web/server/tests/unit/with_dbs/04/workspaces/conftest.py @@ -5,7 +5,6 @@ import pytest import sqlalchemy as sa -from pytest_mock import MockerFixture from simcore_postgres_database.models.projects import projects from simcore_postgres_database.models.workspaces import workspaces @@ -16,17 +15,3 @@ def workspaces_clean_db(postgres_db: sa.engine.Engine) -> Iterator[None]: yield con.execute(workspaces.delete()) con.execute(projects.delete()) - - -@pytest.fixture -def mock_catalog_api_get_services_for_user_in_product(mocker: MockerFixture): - mocker.patch( - "simcore_service_webserver.projects._crud_api_read.catalog_service.get_services_for_user_in_product", - spec=True, - return_value=[], - ) - mocker.patch( - "simcore_service_webserver.projects._controller.projects_rest.are_project_services_available", - spec=True, - return_value=True, - ) diff --git a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces.py b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces.py index 88b684ddb562..aa3d8bb367e4 100644 --- a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces.py +++ b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces.py @@ -11,7 +11,6 @@ from aiohttp.test_utils import TestClient from models_library.api_schemas_webserver.workspaces import WorkspaceGet from models_library.rest_ordering import OrderDirection -from pytest_mock import MockerFixture from pytest_simcore.helpers.assert_checks import assert_status from pytest_simcore.helpers.webserver_login import UserInfoDict from pytest_simcore.helpers.webserver_parametrizations import ( @@ -64,7 +63,6 @@ async def test_workspaces_workflow( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, workspaces_clean_db: AsyncIterator[None], ): assert client.app diff --git a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__delete_workspace_with_content.py b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__delete_workspace_with_content.py index 35f98a79f854..ba394c4797c8 100644 --- a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__delete_workspace_with_content.py +++ b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__delete_workspace_with_content.py @@ -47,7 +47,6 @@ async def test_workspaces_full_workflow_deletion( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, mock_storage_delete_data_folders: mock.Mock, diff --git a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__folders_and_projects_crud.py b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__folders_and_projects_crud.py index b536ef5bf01b..ef2d49bdf375 100644 --- a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__folders_and_projects_crud.py +++ b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__folders_and_projects_crud.py @@ -28,7 +28,6 @@ async def test_workspaces_full_workflow_with_folders_and_projects( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, ): @@ -257,7 +256,6 @@ async def test_workspaces_delete_folders( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, mock_storage_delete_data_folders: mock.Mock, @@ -367,7 +365,6 @@ async def test_listing_folders_and_projects_in_workspace__multiple_workspaces_cr logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, ): diff --git a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__list_projects_full_search.py b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__list_projects_full_search.py index 3ee21f6d55fa..05de4079cd3e 100644 --- a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__list_projects_full_search.py +++ b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__list_projects_full_search.py @@ -11,7 +11,6 @@ import pytest from aiohttp.test_utils import TestClient -from pytest_mock import MockerFixture from pytest_simcore.helpers.assert_checks import assert_status from pytest_simcore.helpers.webserver_login import UserInfoDict from pytest_simcore.helpers.webserver_projects import create_project @@ -30,7 +29,6 @@ async def test_workspaces__list_projects_full_search( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, ): @@ -150,7 +148,6 @@ async def test__list_projects_full_search_with_query_parameters( client: TestClient, logged_user: UserInfoDict, user_project: ProjectDict, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, ): diff --git a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py index ad01ef5b947c..54a8b2851709 100644 --- a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py +++ b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_folders_between_workspaces.py @@ -10,7 +10,6 @@ import pytest from aiohttp.test_utils import TestClient -from pytest_mock import MockerFixture from pytest_simcore.helpers.assert_checks import assert_status from pytest_simcore.helpers.webserver_login import UserInfoDict from pytest_simcore.helpers.webserver_projects import create_project @@ -186,7 +185,6 @@ async def _move_folder_to_workspace_and_assert( async def test_moving_between_private_and_shared_workspaces( client: TestClient, logged_user: UserInfoDict, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, moving_folder_id: str, workspaces_clean_db: None, diff --git a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_projects_between_workspaces.py b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_projects_between_workspaces.py index af37341eda56..d9aafad87730 100644 --- a/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_projects_between_workspaces.py +++ b/services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__moving_projects_between_workspaces.py @@ -11,7 +11,6 @@ import pytest import sqlalchemy as sa from aiohttp.test_utils import TestClient -from pytest_mock import MockerFixture from pytest_simcore.helpers.assert_checks import assert_status from pytest_simcore.helpers.webserver_login import UserInfoDict from pytest_simcore.helpers.webserver_parametrizations import ( @@ -31,7 +30,6 @@ async def test_moving_between_workspaces_user_role_permissions( logged_user: UserInfoDict, user_project: ProjectDict, expected: ExpectedResponse, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, ): @@ -49,7 +47,6 @@ async def test_moving_between_private_and_shared_workspaces( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, ): @@ -116,7 +113,6 @@ async def test_moving_between_shared_and_shared_workspaces( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, ): @@ -182,7 +178,6 @@ async def test_moving_between_workspaces_check_removed_from_folder( logged_user: UserInfoDict, user_project: ProjectDict, expected: HTTPStatus, - mock_catalog_api_get_services_for_user_in_product: MockerFixture, fake_project: ProjectDict, workspaces_clean_db: None, postgres_db: sa.engine.Engine, From 59bc6b7f1faae066f0abe0e83c2efb55234f6720 Mon Sep 17 00:00:00 2001 From: matusdrobuliak66 Date: Thu, 12 Jun 2025 15:37:31 +0200 Subject: [PATCH 5/5] fix tests --- .github/workflows/ci-testing-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-testing-deploy.yml b/.github/workflows/ci-testing-deploy.yml index 127398d7dcc1..1e62ecb7c64d 100644 --- a/.github/workflows/ci-testing-deploy.yml +++ b/.github/workflows/ci-testing-deploy.yml @@ -2656,7 +2656,7 @@ jobs: if: ${{ always() }} needs: [ - system-test-e2e, + # system-test-e2e, NOTE: not required, until Odei will have a look system-test-e2e-playwright, system-test-environment-setup, system-test-public-api,