mirror of
https://github.com/thib8956/nginx-proxy
synced 2026-11-06 18:42:25 +00:00
tests: standardize file structure & naming
This commit is contained in:
1 parent
35e2d21527
commit
eb09876f97
124 files changed
+16
-8
No files matched your search
@@ -1 +0,0 @@
|
|||||||
This directory contains tests that showcase scenarios known to break the expected behavior of nginx-proxy.
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,8 +1,8 @@
|
|||||||
"""
|
"""
|
||||||
Test that nginx-proxy-tester can build successfully
|
Test that nginx-proxy-tester can build successfully
|
||||||
"""
|
"""
|
||||||
|
import pathlib
|
||||||
import re
|
import re
|
||||||
import os
|
|
||||||
|
|
||||||
import docker
|
import docker
|
||||||
import pytest
|
import pytest
|
||||||
@@ -13,12 +13,13 @@ client = docker.from_env()
|
|||||||
@pytest.fixture(scope = "session")
|
@pytest.fixture(scope = "session")
|
||||||
def docker_build(request):
|
def docker_build(request):
|
||||||
# Define Dockerfile path
|
# Define Dockerfile path
|
||||||
dockerfile_path = os.path.join(os.path.dirname(__file__), "requirements/")
|
current_file_path = pathlib.Path(__file__)
|
||||||
|
dockerfile_path = current_file_path.parent.parent.joinpath("requirements")
|
||||||
dockerfile_name = "Dockerfile-nginx-proxy-tester"
|
dockerfile_name = "Dockerfile-nginx-proxy-tester"
|
||||||
|
|
||||||
# Build the Docker image
|
# Build the Docker image
|
||||||
image, logs = client.images.build(
|
image, logs = client.images.build(
|
||||||
path = dockerfile_path,
|
path = dockerfile_path.as_posix(),
|
||||||
dockerfile = dockerfile_name,
|
dockerfile = dockerfile_name,
|
||||||
rm = True, # Remove intermediate containers
|
rm = True, # Remove intermediate containers
|
||||||
tag = "nginx-proxy-tester-ci", # Tag for the built image
|
tag = "nginx-proxy-tester-ci", # Tag for the built image
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -22,7 +22,7 @@ def web1(docker_compose):
|
|||||||
},
|
},
|
||||||
ports={"81/tcp": None}
|
ports={"81/tcp": None}
|
||||||
)
|
)
|
||||||
docker_compose.networks.get("test_default").connect(container)
|
docker_compose.networks.get("test_events-net").connect(container)
|
||||||
sleep(2) # give it some time to initialize and for docker-gen to detect it
|
sleep(2) # give it some time to initialize and for docker-gen to detect it
|
||||||
yield container
|
yield container
|
||||||
try:
|
try:
|
||||||
@@ -47,7 +47,7 @@ def web2(docker_compose):
|
|||||||
},
|
},
|
||||||
ports={"82/tcp": None}
|
ports={"82/tcp": None}
|
||||||
)
|
)
|
||||||
docker_compose.networks.get("test_default").connect(container)
|
docker_compose.networks.get("test_events-net").connect(container)
|
||||||
sleep(2) # give it some time to initialize and for docker-gen to detect it
|
sleep(2) # give it some time to initialize and for docker-gen to detect it
|
||||||
yield container
|
yield container
|
||||||
try:
|
try:
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: test_events-net
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginxproxy:
|
nginxproxy:
|
||||||
image: nginxproxy/nginx-proxy:test
|
image: nginxproxy/nginx-proxy:test
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -3,7 +3,7 @@ services:
|
|||||||
image: nginxproxy/nginx-proxy:test
|
image: nginxproxy/nginx-proxy:test
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||||
- ./test_location-override.vhost.d:/etc/nginx/vhost.d:ro
|
- ./vhost.d:/etc/nginx/vhost.d:ro
|
||||||
|
|
||||||
explicit-root:
|
explicit-root:
|
||||||
image: web
|
image: web
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 124 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user