1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-01 14:25:46 +00:00

tests: enable local testing on macOS / Darwin

This commit is contained in:
Nicolas Duchon
2024-12-30 13:41:47 +01:00
parent daa9449176
commit 40309e2441
12 changed files with 55 additions and 8 deletions

View File

@ -1,12 +1,12 @@
def test_raw_ipv4_vhost_forwards_to_web1(docker_compose, nginxproxy):
r = nginxproxy.get("http://172.20.0.4")
r = nginxproxy.get("http://172.20.0.1")
assert r.status_code == 200
web1_container = docker_compose.containers.get("web1")
assert r.text == f"I'm {web1_container.id[:12]}\n"
def test_raw_ipv6_vhost_forwards_to_web2(docker_compose, nginxproxy):
r = nginxproxy.get("http://[fd00::4]", ipv6=True)
r = nginxproxy.get("http://[fd00::1]")
assert r.status_code == 200
web2_container = docker_compose.containers.get("web2")
assert r.text == f"I'm {web2_container.id[:12]}\n"

View File

@ -22,7 +22,7 @@ services:
- "81"
environment:
WEB_PORTS: "81"
VIRTUAL_HOST: "172.20.0.4"
VIRTUAL_HOST: "172.20.0.1"
networks:
net1:
ipv4_address: 172.20.0.2
@ -35,7 +35,7 @@ services:
- "82"
environment:
WEB_PORTS: "82"
VIRTUAL_HOST: "[fd00::4]"
VIRTUAL_HOST: "[fd00::1]"
networks:
net1:
ipv4_address: 172.20.0.3