mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 09:48:14 +00:00
tests: Fix path to ca-root.crt
`os.getcwd()` is not guaranteed to always return the `test/` directory.
This commit is contained in:
parent
6f2a549ef1
commit
01745a836f
@ -425,6 +425,12 @@ def connect_to_all_networks():
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def ca_root_certificate():
|
||||||
|
return CA_ROOT_CERTIFICATE
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
def docker_compose(request):
|
def docker_compose(request):
|
||||||
"""
|
"""
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
|
||||||
|
|
||||||
import backoff
|
import backoff
|
||||||
import docker
|
import docker
|
||||||
@ -219,7 +218,7 @@ def test_custom_dhparam_is_supported(docker_compose):
|
|||||||
|
|
||||||
# Only `web2` has a site-specific DH param file (which overrides all other DH config)
|
# Only `web2` has a site-specific DH param file (which overrides all other DH config)
|
||||||
# Other tests here use `web5` explicitly, or implicitly (via ENV `DEFAULT_HOST`, otherwise first HTTPS server)
|
# Other tests here use `web5` explicitly, or implicitly (via ENV `DEFAULT_HOST`, otherwise first HTTPS server)
|
||||||
def test_custom_dhparam_is_supported_per_site(docker_compose):
|
def test_custom_dhparam_is_supported_per_site(docker_compose, ca_root_certificate):
|
||||||
container_name="dh-file"
|
container_name="dh-file"
|
||||||
sut_container = docker_client.containers.get(container_name)
|
sut_container = docker_client.containers.get(container_name)
|
||||||
assert sut_container.status == "running"
|
assert sut_container.status == "running"
|
||||||
@ -242,7 +241,7 @@ def test_custom_dhparam_is_supported_per_site(docker_compose):
|
|||||||
# - `web2` has it's own cert provisioned at `/etc/nginx/certs/web2.nginx-proxy.tld.crt`.
|
# - `web2` has it's own cert provisioned at `/etc/nginx/certs/web2.nginx-proxy.tld.crt`.
|
||||||
can_verify_chain_of_trust(
|
can_verify_chain_of_trust(
|
||||||
sut_container,
|
sut_container,
|
||||||
ca_cert = f"{os.getcwd()}/certs/ca-root.crt",
|
ca_cert = ca_root_certificate,
|
||||||
fqdn = 'web2.nginx-proxy.tld'
|
fqdn = 'web2.nginx-proxy.tld'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user