Skip to content

Commit 9fbf1cf

Browse files
author
Andrei Neagu
committed
fixed tests
1 parent 792d597 commit 9fbf1cf

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

services/director-v2/tests/unit/test_api_route_dynamic_scheduler.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from models_library.service_settings_labels import SimcoreServiceLabels
1616
from pytest_mock.plugin import MockerFixture
1717
from pytest_simcore.helpers.typing_env import EnvVarsDict
18+
from settings_library.redis import RedisSettings
1819
from simcore_service_director_v2.models.dynamic_services_scheduler import SchedulerData
1920
from simcore_service_director_v2.modules.dynamic_sidecar.errors import (
2021
DynamicSidecarNotFoundError,
@@ -24,12 +25,17 @@
2425
)
2526
from starlette.testclient import TestClient
2627

28+
pytest_simcore_core_services_selection = [
29+
"redis",
30+
]
31+
2732

2833
@pytest.fixture
2934
def 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,

services/director-v2/tests/unit/test_modules_dynamic_sidecar_scheduler.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from pytest_mock.plugin import MockerFixture
2424
from pytest_simcore.helpers.typing_env import EnvVarsDict
2525
from respx.router import MockRouter
26+
from settings_library.redis import RedisSettings
2627
from simcore_service_director_v2.models.dynamic_services_scheduler import (
2728
DockerContainerInspect,
2829
DynamicSidecarStatus,
@@ -56,8 +57,13 @@
5657
log = 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

6369
def 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,

services/director-v2/tests/unit/test_modules_dynamic_sidecar_scheduler_task.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from pytest_simcore.helpers.monkeypatch_envs import setenvs_from_dict
2121
from pytest_simcore.helpers.typing_env import EnvVarsDict
2222
from respx.router import MockRouter
23+
from settings_library.redis import RedisSettings
2324
from simcore_service_director_v2.models.dynamic_services_scheduler import SchedulerData
2425
from simcore_service_director_v2.modules.dynamic_sidecar.api_client._public import (
2526
SidecarsClient,
@@ -38,6 +39,10 @@
3839
DynamicSidecarsScheduler,
3940
)
4041

42+
pytest_simcore_core_services_selection = [
43+
"redis",
44+
]
45+
4146
SCHEDULER_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,

0 commit comments

Comments
 (0)