Skip to content

Commit dbd02cd

Browse files
committed
fix: Adjust ping requests.
1 parent b47bdb1 commit dbd02cd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

eventsourcingdb_client_python/handlers/ping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
async def ping(client: AbstractBaseClient) -> None:
8-
response = await client.http_client.get('/ping')
8+
response = await client.http_client.get('/api/ping')
99
response_body = bytes.decode(await response.body.read(), encoding='utf-8')
1010

1111
if response.status_code != HTTPStatus.OK or response_body != HTTPStatus.OK.phrase:

tests/shared/start_local_http_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def attached_handler():
3030

3131
attach_handlers(attach_handler)
3232

33-
@self.app.get('/__python_test__/ping')
33+
@self.app.get('/__python_test__/api/ping')
3434
def ping():
3535
return "OK"
3636

@@ -48,7 +48,7 @@ async def ping_app() -> RetryResult[None]:
4848
async with session:
4949
try:
5050
response = await session.get(
51-
f'http://localhost:{local_http_server.port}/__python_test__/ping', timeout=1
51+
f'http://localhost:{local_http_server.port}/__python_test__/api/ping', timeout=1
5252
)
5353
except aiohttp.ClientError as error:
5454
return Retry(cause=error)

tests/test_ping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def handle_ping(response: Response) -> Response:
4949
response.set_data('OK')
5050
return response
5151

52-
attach_handler('/ping', 'GET', handle_ping)
52+
attach_handler('/api/ping', 'GET', handle_ping)
5353

5454
client = await get_client(attach_handlers)
5555

@@ -67,7 +67,7 @@ def handle_ping(response: Response) -> Response:
6767
response.set_data('not OK')
6868
return response
6969

70-
attach_handler('/ping', 'GET', handle_ping)
70+
attach_handler('/api/ping', 'GET', handle_ping)
7171

7272
client = await get_client(attach_handlers)
7373

0 commit comments

Comments
 (0)