mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 01:38:15 +00:00
Apply suggestions from code review
Commited code style consistency suggestions. Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
This commit is contained in:
parent
46724e7cb6
commit
c678cfdddf
@ -7,18 +7,18 @@ import re
|
|||||||
|
|
||||||
client = docker.from_env()
|
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 = "requirements/"
|
dockerfile_path = "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,
|
||||||
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
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check for build success
|
# Check for build success
|
||||||
@ -43,9 +43,8 @@ def test_build_nginx_proxy_tester(docker_build):
|
|||||||
def test_run_nginx_proxy_tester(docker_build):
|
def test_run_nginx_proxy_tester(docker_build):
|
||||||
# Run the container with 'pytest -v' command to output version info
|
# Run the container with 'pytest -v' command to output version info
|
||||||
container = client.containers.run("nginx-proxy-tester-ci",
|
container = client.containers.run("nginx-proxy-tester-ci",
|
||||||
command="pytest -V",
|
command = "pytest -V",
|
||||||
detach=True,
|
detach = True,
|
||||||
# auto_remove=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Wait for the container to finish and get the exit code
|
# Wait for the container to finish and get the exit code
|
||||||
|
Loading…
x
Reference in New Issue
Block a user