1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-02 23:05:46 +00:00

test: add tests for host mode fix

This commit is contained in:
Nicolas Duchon
2023-04-28 22:23:09 +02:00
parent 325fd01ebb
commit 882e9a3b3c
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import pytest
def test_forwards_to_bridge_network_container(docker_compose, nginxproxy):
r = nginxproxy.get("http://bridge-network.nginx-proxy.tld/port")
assert r.status_code == 200
assert r.text == "answer from port 80\n"
def test_forwards_to_host_network_container(docker_compose, nginxproxy):
r = nginxproxy.get("http://host-network.nginx-proxy.tld/port")
assert r.status_code == 200
assert r.text == "answer from port 8080\n"