Skip to content

Commit a0963b3

Browse files
author
Andrei Neagu
committed
renamed fixtures
1 parent cfb9169 commit a0963b3

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

services/dynamic-sidecar/tests/unit/test_api_rest_prometheus_metrics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async def httpx_async_client(
101101

102102

103103
@pytest.fixture
104-
def client(
104+
def http_client(
105105
app: FastAPI, httpx_async_client: AsyncClient, backend_url: AnyHttpUrl
106106
) -> HttpClient:
107107
return HttpClient(
@@ -162,7 +162,7 @@ async def test_metrics_enabled_containers_will_start(
162162
enable_prometheus_metrics: None,
163163
app: FastAPI,
164164
httpx_async_client: AsyncClient,
165-
client: HttpClient,
165+
http_client: HttpClient,
166166
compose_spec: str,
167167
mock_metrics_params: CreateServiceMetricsAdditionalParams,
168168
):
@@ -172,7 +172,7 @@ async def test_metrics_enabled_containers_will_start(
172172
assert _USER_SERVICES_NOT_STARTED in response.text
173173

174174
async with periodic_task_result(
175-
client=client,
175+
client=http_client,
176176
task_id=await _get_task_id_create_service_containers(
177177
httpx_async_client, compose_spec, mock_metrics_params
178178
),

services/dynamic-sidecar/tests/unit/test_api_rest_workflow_service_metrics.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async def httpx_async_client(
141141

142142

143143
@pytest.fixture
144-
async def client(
144+
async def http_client(
145145
app: FastAPI, httpx_async_client: AsyncClient, backend_url: AnyHttpUrl
146146
) -> HttpClient:
147147
return HttpClient(
@@ -234,13 +234,13 @@ async def test_service_starts_and_closes_as_expected(
234234
mock_post_rabbit_message: AsyncMock,
235235
app: FastAPI,
236236
httpx_async_client: AsyncClient,
237-
client: HttpClient,
237+
http_client: HttpClient,
238238
compose_spec: str,
239239
container_names: list[str],
240240
mock_metrics_params: CreateServiceMetricsAdditionalParams,
241241
):
242242
async with periodic_task_result(
243-
client=client,
243+
client=http_client,
244244
task_id=await _get_task_id_create_service_containers(
245245
httpx_async_client, compose_spec, mock_metrics_params
246246
),
@@ -253,7 +253,7 @@ async def test_service_starts_and_closes_as_expected(
253253
await _wait_for_containers_to_be_running(app)
254254

255255
async with periodic_task_result(
256-
client=client,
256+
client=http_client,
257257
task_id=await _get_task_id_docker_compose_down(httpx_async_client),
258258
task_timeout=_CREATE_SERVICE_CONTAINERS_TIMEOUT,
259259
status_poll_interval=_FAST_STATUS_POLL,
@@ -287,15 +287,15 @@ async def test_user_services_fail_to_start(
287287
mock_post_rabbit_message: AsyncMock,
288288
app: FastAPI,
289289
httpx_async_client: AsyncClient,
290-
client: HttpClient,
290+
http_client: HttpClient,
291291
compose_spec: str,
292292
mock_metrics_params: CreateServiceMetricsAdditionalParams,
293293
with_compose_down: bool,
294294
mock_user_services_fail_to_start: None,
295295
):
296296
with pytest.raises(TaskExceptionError):
297297
async with periodic_task_result(
298-
client=client,
298+
client=http_client,
299299
task_id=await _get_task_id_create_service_containers(
300300
httpx_async_client, compose_spec, mock_metrics_params
301301
),
@@ -308,7 +308,7 @@ async def test_user_services_fail_to_start(
308308

309309
if with_compose_down:
310310
async with periodic_task_result(
311-
client=client,
311+
client=http_client,
312312
task_id=await _get_task_id_docker_compose_down(httpx_async_client),
313313
task_timeout=_CREATE_SERVICE_CONTAINERS_TIMEOUT,
314314
status_poll_interval=_FAST_STATUS_POLL,
@@ -326,14 +326,14 @@ async def test_user_services_fail_to_stop_or_save_data(
326326
mock_post_rabbit_message: AsyncMock,
327327
app: FastAPI,
328328
httpx_async_client: AsyncClient,
329-
client: HttpClient,
329+
http_client: HttpClient,
330330
compose_spec: str,
331331
container_names: list[str],
332332
mock_metrics_params: CreateServiceMetricsAdditionalParams,
333333
mock_user_services_fail_to_stop: None,
334334
):
335335
async with periodic_task_result(
336-
client=client,
336+
client=http_client,
337337
task_id=await _get_task_id_create_service_containers(
338338
httpx_async_client, compose_spec, mock_metrics_params
339339
),
@@ -353,7 +353,7 @@ async def test_user_services_fail_to_stop_or_save_data(
353353
for _ in range(_EXPECTED_STOP_MESSAGES):
354354
with pytest.raises(TaskExceptionError):
355355
async with periodic_task_result(
356-
client=client,
356+
client=http_client,
357357
task_id=await _get_task_id_docker_compose_down(httpx_async_client),
358358
task_timeout=_CREATE_SERVICE_CONTAINERS_TIMEOUT,
359359
status_poll_interval=_FAST_STATUS_POLL,
@@ -423,15 +423,15 @@ async def test_user_services_crash_when_running(
423423
mock_post_rabbit_message: AsyncMock,
424424
app: FastAPI,
425425
httpx_async_client: AsyncClient,
426-
client: HttpClient,
426+
http_client: HttpClient,
427427
compose_spec: str,
428428
container_names: list[str],
429429
mock_metrics_params: CreateServiceMetricsAdditionalParams,
430430
mock_one_container_oom_killed: Callable[[], None],
431431
expected_platform_state: SimcorePlatformStatus,
432432
):
433433
async with periodic_task_result(
434-
client=client,
434+
client=http_client,
435435
task_id=await _get_task_id_create_service_containers(
436436
httpx_async_client, compose_spec, mock_metrics_params
437437
),
@@ -483,7 +483,7 @@ async def test_user_services_crash_when_running(
483483
_EXPECTED_STOP_MESSAGES = 4
484484
for _ in range(_EXPECTED_STOP_MESSAGES):
485485
async with periodic_task_result(
486-
client=client,
486+
client=http_client,
487487
task_id=await _get_task_id_docker_compose_down(httpx_async_client),
488488
task_timeout=_CREATE_SERVICE_CONTAINERS_TIMEOUT,
489489
status_poll_interval=_FAST_STATUS_POLL,

0 commit comments

Comments
 (0)