17 lines
681 B
Python
17 lines
681 B
Python
import platform
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.xfail(platform.system() == "Darwin", reason="Host networking only work on Linux")
|
|
def test_forwards_to_host_network_container_1(docker_compose, nginxproxy):
|
|
r = nginxproxy.get("http://host-network-1.nginx-proxy.tld:8888/port")
|
|
assert r.status_code == 200
|
|
assert r.text == "answer from port 8080\n"
|
|
|
|
|
|
@pytest.mark.xfail(platform.system() == "Darwin", reason="Host networking only work on Linux")
|
|
def test_forwards_to_host_network_container_2(docker_compose, nginxproxy):
|
|
r = nginxproxy.get("http://host-network-2.nginx-proxy.tld:8888/port")
|
|
assert r.status_code == 200
|
|
assert r.text == "answer from port 8181\n"
|