File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,17 @@ def compose():
20
20
21
21
22
22
def test_health (compose : DockerCompose ):
23
+ host = compose .get_service_host ("app" )
23
24
port = compose .get_service_port ("app" , 80 )
24
25
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" )
26
27
assert response .status_code == 200
27
28
assert response .text == "UP"
28
29
29
30
30
31
def test_ping (compose : DockerCompose ):
32
+ host = compose .get_service_host ("app" )
31
33
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" )
33
35
assert response .status_code == 200
34
36
assert response .text == "PONG"
You can’t perform that action at this time.
0 commit comments