Skip to content

Commit 85fd3f8

Browse files
committed
fixing app_environs
1 parent a5907a6 commit 85fd3f8

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,16 @@ async def drop_all_preferences(
2828
def app_environment(
2929
monkeypatch: pytest.MonkeyPatch,
3030
app_environment: EnvVarsDict,
31-
docker_compose_service_environment_dict: EnvVarsDict,
31+
service_name: str,
3232
) -> EnvVarsDict:
3333
return app_environment | setenvs_from_dict(
3434
monkeypatch,
3535
{
36-
**docker_compose_service_environment_dict,
3736
# disable tracing for tests
3837
"TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT": "null",
3938
"TRACING_OPENTELEMETRY_COLLECTOR_PORT": "null",
4039
"WEBSERVER_TRACING": "null",
41-
"WEBSERVER_RPC_NAMESPACE": "null",
40+
"WEBSERVER_RPC_NAMESPACE": service_name,
4241
},
4342
)
4443

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,20 @@ def fast_service_deletion_delay() -> int:
5252
def app_environment(
5353
fast_service_deletion_delay: int,
5454
monkeypatch: pytest.MonkeyPatch,
55-
docker_compose_service_environment_dict: EnvVarsDict,
56-
env_devel_dict: EnvVarsDict,
55+
app_environment: EnvVarsDict,
56+
service_name: str,
5757
) -> EnvVarsDict:
58+
monkeypatch.delenv("WEBSERVER_GARBAGE_COLLECTOR", raising=False)
59+
app_environment.pop("WEBSERVER_GARBAGE_COLLECTOR", None)
5860

59-
return setenvs_from_dict(
61+
return app_environment | setenvs_from_dict(
6062
monkeypatch,
6163
{
62-
**docker_compose_service_environment_dict,
6364
"WEBSERVER_COMPUTATION": "1",
6465
"WEBSERVER_NOTIFICATIONS": "1",
6566
# sets TTL of a resource after logout
6667
"RESOURCE_MANAGER_RESOURCE_TTL_S": f"{fast_service_deletion_delay}",
67-
# "WEBSERVER_PROJECTS must be enabled for close_project fixture"
68-
"WEBSERVER_PROJECTS": env_devel_dict["WEBSERVER_PROJECTS"],
68+
"WEBSERVER_RPC_NAMESPACE": service_name,
6969
},
7070
)
7171

0 commit comments

Comments
 (0)