Skip to content

Commit de9b384

Browse files
committed
disable tracing to remove warnings
1 parent d717076 commit de9b384

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

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

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,33 @@
66

77
from collections.abc import AsyncIterator
88

9-
import aiopg.sa
109
import pytest
10+
from pytest_simcore.helpers.monkeypatch_envs import setenvs_from_dict
11+
from pytest_simcore.helpers.typing_env import EnvVarsDict
1112
from simcore_postgres_database.models.user_preferences import user_preferences_frontend
13+
from sqlalchemy.ext.asyncio import AsyncEngine
1214

1315

1416
@pytest.fixture
1517
async def drop_all_preferences(
16-
aiopg_engine: aiopg.sa.engine.Engine,
18+
asyncpg_engine: AsyncEngine,
1719
) -> AsyncIterator[None]:
1820
yield
19-
async with aiopg_engine.acquire() as conn:
21+
async with asyncpg_engine.connect() as conn:
2022
await conn.execute(user_preferences_frontend.delete())
23+
24+
25+
@pytest.fixture
26+
def app_environment(
27+
monkeypatch: pytest.MonkeyPatch,
28+
app_environment: EnvVarsDict,
29+
) -> EnvVarsDict:
30+
return app_environment | setenvs_from_dict(
31+
monkeypatch,
32+
{
33+
# disable tracing for tests
34+
"TRACING_OPENTELEMETRY_COLLECTOR_ENDPOINT": "null",
35+
"TRACING_OPENTELEMETRY_COLLECTOR_PORT": "null",
36+
"WEBSERVER_TRACING": "null",
37+
},
38+
)

0 commit comments

Comments
 (0)