1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-01 22:35:45 +00:00

tests: review comments

This commit is contained in:
Nicolas Duchon
2024-12-27 16:16:55 +01:00
parent 1e9745f604
commit ea99c1a6f9
47 changed files with 78 additions and 80 deletions

View File

@ -1,5 +1,5 @@
import logging
import time
from time import sleep
import pytest
@ -13,11 +13,11 @@ def test_nginx_config_remains_the_same_after_restart(docker_compose, nginxproxy)
"""
Restarts the Web container and returns nginx-proxy config after restart
"""
def get_conf_after_web_container_restart():
def get_conf_after_web_container_restart() -> bytes:
web_containers = docker_compose.containers.list(filters={"ancestor": "web:latest"})
assert len(web_containers) == 1
web_containers[0].restart()
time.sleep(3)
sleep(3)
return nginxproxy.get_conf()

View File

@ -16,7 +16,7 @@ services:
expose:
- "81"
environment:
WEB_PORTS: 81
WEB_PORTS: "81"
VIRTUAL_HOST: web1.nginx-proxy.example
networks:
- net1