Skip to content

Commit 3dbd49e

Browse files
committed
✨ Update test configurations: Adjust environment variables for WEBSERVER_FUNCTIONS and WEBSERVER_NOTIFICATIONS in various test fixtures
1 parent c65298c commit 3dbd49e

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

services/web/server/tests/unit/isolated/test_application_settings.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,11 @@ class DevSettings(ApplicationSettings):
141141

142142
if is_dev_feature_enabled:
143143
assert settings.WEBSERVER_DEV_FEATURES_ENABLED is True
144-
assert settings.WEBSERVER_FUNCTIONS is True
145144

146145
assert settings.TEST_FOO is True
147146
assert settings.TEST_BAR == 42
148147
else:
149148
assert settings.WEBSERVER_DEV_FEATURES_ENABLED is False
150-
assert settings.WEBSERVER_FUNCTIONS is False
151149

152150
assert settings.TEST_FOO is False
153151
assert settings.TEST_BAR is None

services/web/server/tests/unit/with_dbs/04/conftest.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@
44

55

66
import pytest
7+
from pytest_simcore.helpers.monkeypatch_envs import setenvs_from_dict
78

89

910
@pytest.fixture
1011
def app_environment(
1112
app_environment: dict[str, str], monkeypatch: pytest.MonkeyPatch
1213
) -> dict[str, str]:
1314
# NOTE: overrides app_environment
14-
monkeypatch.setenv("WEBSERVER_GARBAGE_COLLECTOR", "null")
15-
return app_environment | {"WEBSERVER_GARBAGE_COLLECTOR": "null"}
15+
return setenvs_from_dict(
16+
monkeypatch,
17+
{
18+
**app_environment,
19+
"WEBSERVER_GARBAGE_COLLECTOR": "null",
20+
"WEBSERVER_FUNCTIONS": "0", # needs rabbitmq
21+
},
22+
)

services/web/server/tests/unit/with_dbs/04/functions_rpc/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def app_environment(
2222
monkeypatch,
2323
{
2424
**app_environment, # WARNING: AFTER env_devel_dict because HOST are set to 127.0.0.1 in here
25-
"WEBSERVER_DEV_FEATURES_ENABLED": "1",
2625
"WEBSERVER_FUNCTIONS": "1",
2726
},
2827
)

services/web/server/tests/unit/with_dbs/04/studies_dispatcher/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ def app_environment(app_environment: EnvVarsDict, monkeypatch: pytest.MonkeyPatc
2222
{
2323
"WEBSERVER_ACTIVITY": "null",
2424
"WEBSERVER_CATALOG": "null",
25-
"WEBSERVER_NOTIFICATIONS": "0",
2625
"WEBSERVER_DIAGNOSTICS": "null",
2726
"WEBSERVER_EXPORTER": "null",
27+
"WEBSERVER_FUNCTIONS": "0",
2828
"WEBSERVER_GROUPS": "1",
29+
"WEBSERVER_NOTIFICATIONS": "0",
2930
"WEBSERVER_PRODUCTS": "1",
3031
"WEBSERVER_PUBLICATIONS": "0",
3132
"WEBSERVER_RABBITMQ": "null",

0 commit comments

Comments
 (0)