File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
services/director-v2/tests/unit Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1515from models_library .service_settings_labels import SimcoreServiceLabels
1616from pytest_mock .plugin import MockerFixture
1717from pytest_simcore .helpers .typing_env import EnvVarsDict
18+ from settings_library .redis import RedisSettings
1819from simcore_service_director_v2 .models .dynamic_services_scheduler import SchedulerData
1920from simcore_service_director_v2 .modules .dynamic_sidecar .errors import (
2021 DynamicSidecarNotFoundError ,
2425)
2526from starlette .testclient import TestClient
2627
28+ pytest_simcore_core_services_selection = [
29+ "redis" ,
30+ ]
31+
2732
2833@pytest .fixture
2934def mock_env (
3035 mock_exclusive : None ,
3136 disable_rabbitmq : None ,
3237 disable_postgres : None ,
38+ redis_service : RedisSettings ,
3339 mock_env : EnvVarsDict ,
3440 monkeypatch : pytest .MonkeyPatch ,
3541 docker_swarm : None ,
Original file line number Diff line number Diff line change 2323from pytest_mock .plugin import MockerFixture
2424from pytest_simcore .helpers .typing_env import EnvVarsDict
2525from respx .router import MockRouter
26+ from settings_library .redis import RedisSettings
2627from simcore_service_director_v2 .models .dynamic_services_scheduler import (
2728 DockerContainerInspect ,
2829 DynamicSidecarStatus ,
5657log = logging .getLogger (__name__ )
5758
5859
59- pytest_simcore_core_services_selection = ["postgres" ]
60- pytest_simcore_ops_services_selection = ["adminer" ]
60+ pytest_simcore_core_services_selection = [
61+ "postgres" ,
62+ "redis" ,
63+ ]
64+ pytest_simcore_ops_services_selection = [
65+ "adminer" ,
66+ ]
6167
6268
6369def get_url (dynamic_sidecar_endpoint : str , postfix : str ) -> str :
@@ -128,6 +134,7 @@ def mock_env(
128134 disable_postgres : None ,
129135 disable_rabbitmq : None ,
130136 mock_env : EnvVarsDict ,
137+ redis_service : RedisSettings ,
131138 monkeypatch : pytest .MonkeyPatch ,
132139 simcore_services_network_name : str ,
133140 mock_docker_api : None ,
Original file line number Diff line number Diff line change 2020from pytest_simcore .helpers .monkeypatch_envs import setenvs_from_dict
2121from pytest_simcore .helpers .typing_env import EnvVarsDict
2222from respx .router import MockRouter
23+ from settings_library .redis import RedisSettings
2324from simcore_service_director_v2 .models .dynamic_services_scheduler import SchedulerData
2425from simcore_service_director_v2 .modules .dynamic_sidecar .api_client ._public import (
2526 SidecarsClient ,
3839 DynamicSidecarsScheduler ,
3940)
4041
42+ pytest_simcore_core_services_selection = [
43+ "redis" ,
44+ ]
45+
4146SCHEDULER_INTERVAL_SECONDS : Final [float ] = 0.1
4247
4348
@@ -46,6 +51,7 @@ def mock_env(
4651 disable_postgres : None ,
4752 disable_rabbitmq : None ,
4853 mock_env : EnvVarsDict ,
54+ redis_service : RedisSettings ,
4955 monkeypatch : pytest .MonkeyPatch ,
5056 simcore_services_network_name : str ,
5157 docker_swarm : None ,
You can’t perform that action at this time.
0 commit comments