mirror of
				https://github.com/thib8956/nginx-proxy
				synced 2025-11-03 18:49:20 +00:00 
			
		
		
		
	tests: review changes
Co-authored-by: Niek <100143256+SchoNie@users.noreply.github.com>
This commit is contained in:
		@@ -2,7 +2,7 @@ services:
 | 
			
		||||
  nginx-proxy:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - /var/run/docker.sock:/tmp/docker.sock:ro
 | 
			
		||||
      - ./custom-fallback.conf:/etc/nginx/conf.d/zzz-custom-fallback.conf:ro
 | 
			
		||||
      - ${PYTEST_MODULE_PATH}/test_fallback.data/custom-fallback.conf:/etc/nginx/conf.d/zzz-custom-fallback.conf:ro
 | 
			
		||||
 | 
			
		||||
  http-only:
 | 
			
		||||
    image: web
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ services:
 | 
			
		||||
  nginx-proxy:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - /var/run/docker.sock:/tmp/docker.sock:ro
 | 
			
		||||
      - ./nodefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
      - ${PYTEST_MODULE_PATH}/test_fallback.data/nodefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
 | 
			
		||||
  https-and-http:
 | 
			
		||||
    image: web
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ services:
 | 
			
		||||
  nginx-proxy:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - /var/run/docker.sock:/tmp/docker.sock:ro
 | 
			
		||||
      - ./withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
      - ${PYTEST_MODULE_PATH}/test_fallback.data/withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
    environment:
 | 
			
		||||
      HTTPS_METHOD: redirect
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ services:
 | 
			
		||||
  nginx-proxy:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - /var/run/docker.sock:/tmp/docker.sock:ro
 | 
			
		||||
      - ./withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
      - ${PYTEST_MODULE_PATH}/test_fallback.data/withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
    environment:
 | 
			
		||||
      HTTPS_METHOD: nohttp
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ services:
 | 
			
		||||
  nginx-proxy:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - /var/run/docker.sock:/tmp/docker.sock:ro
 | 
			
		||||
      - ./withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
      - ${PYTEST_MODULE_PATH}/test_fallback.data/withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
    environment:
 | 
			
		||||
      HTTPS_METHOD: nohttp
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ services:
 | 
			
		||||
  nginx-proxy:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - /var/run/docker.sock:/tmp/docker.sock:ro
 | 
			
		||||
      - ./withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
      - ${PYTEST_MODULE_PATH}/test_fallback.data/withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
    environment:
 | 
			
		||||
      TRUST_DEFAULT_CERT: "false"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ services:
 | 
			
		||||
  nginx-proxy:
 | 
			
		||||
    volumes:
 | 
			
		||||
      - /var/run/docker.sock:/tmp/docker.sock:ro
 | 
			
		||||
      - ./withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
      - ${PYTEST_MODULE_PATH}/test_fallback.data/withdefault.certs:/etc/nginx/certs:ro
 | 
			
		||||
 | 
			
		||||
  https-and-http:
 | 
			
		||||
    image: web
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ import pytest
 | 
			
		||||
 | 
			
		||||
pytestmark = pytest.mark.skipif(
 | 
			
		||||
    platform.system() == "Darwin",
 | 
			
		||||
    reason="Those tests rely entirely on being able to directly contact container's IP"
 | 
			
		||||
    reason="Those tests rely entirely on being able to directly contact the container's IP"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ def test_forwards_to_web2(docker_compose, nginxproxy):
 | 
			
		||||
 | 
			
		||||
@pytest.mark.skipif(
 | 
			
		||||
    platform.system() == "Darwin",
 | 
			
		||||
    reason="This test rely on being able to directly contact the container's IP"
 | 
			
		||||
    reason="This test depends on direct communication with the container's IP"
 | 
			
		||||
)
 | 
			
		||||
def test_ipv6_is_disabled_by_default(docker_compose, nginxproxy):
 | 
			
		||||
    with pytest.raises(ConnectionError):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user