Skip to content

Commit bc39fe3

Browse files
committed
add integration test
1 parent 63edf17 commit bc39fe3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests-int/test_health.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ def compose():
2020

2121

2222
def test_health(compose: DockerCompose):
23+
host = compose.get_service_host("app")
2324
port = compose.get_service_port("app", 80)
2425
assert "Application startup complete." in compose.get_logs("app")[0]
25-
response = requests.get(f"http://localhost:{port}/health")
26+
response = requests.get(f"http://{host}:{port}/health")
2627
assert response.status_code == 200
2728
assert response.text == "UP"
2829

2930

3031
def test_ping(compose: DockerCompose):
32+
host = compose.get_service_host("app")
3133
port = compose.get_service_port("app", 80)
32-
response = requests.get(f"http://localhost:{port}/ping")
34+
response = requests.get(f"http://{host}:{port}/ping")
3335
assert response.status_code == 200
3436
assert response.text == "PONG"

0 commit comments

Comments
 (0)