From ea99c1a6f900ceaad4c491e37ebc4cb090236ca1 Mon Sep 17 00:00:00 2001 From: Nicolas Duchon Date: Fri, 27 Dec 2024 16:16:55 +0100 Subject: [PATCH] tests: review comments --- test/test_custom/test_defaults-location.yml | 6 +++--- test/test_custom/test_defaults.yml | 4 ++-- test/test_custom/test_location-per-vhost.yml | 6 +++--- test/test_custom/test_per-vhost.yml | 6 +++--- test/test_custom/test_proxy-wide.yml | 4 ++-- test/test_debug-endpoint/test_global.yml | 6 +++--- test/test_debug-endpoint/test_per-container.yml | 6 +++--- test/test_default-host/test_default-host.yml | 2 +- test/test_docker-unix-socket/test_docker-unix-socket.yml | 4 ++-- test/test_dockergen/.gitignore | 1 - test/test_dockergen/test_dockergen.yml | 2 +- test/test_headers/test_http.yml | 4 ++-- test/test_headers/test_https.yml | 4 ++-- test/test_htpasswd/test_htpasswd-regex-virtual-host.yml | 2 +- test/test_htpasswd/test_htpasswd-virtual-host.yml | 2 +- test/test_htpasswd/test_htpasswd-virtual-path.yml | 2 +- test/test_http2/test_http2-global-disabled.yml | 2 +- test/test_http3/test_http3-global-disabled.yml | 2 +- test/test_http3/test_http3-global-enabled.yml | 2 +- test/test_http3/test_http3-vhost.yml | 6 +++--- test/test_internal/test_internal-per-vhost.yml | 4 ++-- test/test_internal/test_internal-per-vpath.yml | 4 ++-- test/test_ipv6/test_ipv6-prefer-ipv4-network.yml | 2 +- test/test_ipv6/test_ipv6-prefer-ipv6-network.yml | 2 +- test/test_ipv6/test_ipv6.yml | 4 ++-- test/test_keepalive/test_keepalive.yml | 6 +++--- test/test_loadbalancing/test_loadbalancing.yml | 4 ++-- test/test_logs/test_log-disabled.yml | 2 +- test/test_logs/test_log-format.yml | 2 +- test/test_logs/test_log-json-format.yml | 2 +- test/test_logs/test_log-json.yml | 2 +- test/test_multiple-hosts/test_multiple-hosts.yml | 2 +- test/test_multiple-networks/test_multiple-networks.py | 3 +-- test/test_multiple-networks/test_multiple-networks.yml | 6 +++--- test/test_nominal/test_nominal.yml | 4 ++-- test/test_raw-ip-vhost/test_raw-ip-vhost.yml | 4 ++-- test/test_server-down/test_load-balancing.yml | 6 +++--- test/test_server-down/test_no-server-down.yml | 2 +- test/test_server-down/test_server-down.yml | 2 +- test/test_trust-downstream-proxy/test_default.yml | 2 +- test/test_trust-downstream-proxy/test_disabled.yml | 2 +- test/test_trust-downstream-proxy/test_enabled.yml | 2 +- test/test_unreachable-network/test_unreachable-network.yml | 4 ++-- test/test_upstream-name/test_predictable-name.yml | 2 +- test/test_upstream-name/test_sha1-name.yml | 2 +- .../test_vhost-in-multiple-networks.py | 6 +++--- .../test_vhost-in-multiple-networks.yml | 2 +- 47 files changed, 78 insertions(+), 80 deletions(-) delete mode 100644 test/test_dockergen/.gitignore diff --git a/test/test_custom/test_defaults-location.yml b/test/test_custom/test_defaults-location.yml index 6247a25..e08bcd4 100644 --- a/test/test_custom/test_defaults-location.yml +++ b/test/test_custom/test_defaults-location.yml @@ -11,7 +11,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example web2: @@ -19,7 +19,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.example web3: @@ -27,5 +27,5 @@ services: expose: - "83" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: web3.nginx-proxy.example diff --git a/test/test_custom/test_defaults.yml b/test/test_custom/test_defaults.yml index 9733b55..cc7a2aa 100644 --- a/test/test_custom/test_defaults.yml +++ b/test/test_custom/test_defaults.yml @@ -10,7 +10,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example web2: @@ -18,5 +18,5 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.example diff --git a/test/test_custom/test_location-per-vhost.yml b/test/test_custom/test_location-per-vhost.yml index ef0380a..6a6ce0c 100644 --- a/test/test_custom/test_location-per-vhost.yml +++ b/test/test_custom/test_location-per-vhost.yml @@ -11,7 +11,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example web2: @@ -19,7 +19,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.example regex: @@ -27,5 +27,5 @@ services: expose: - "83" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: ~^regex.*\.nginx-proxy\.example$ diff --git a/test/test_custom/test_per-vhost.yml b/test/test_custom/test_per-vhost.yml index c01ba05..da5f468 100644 --- a/test/test_custom/test_per-vhost.yml +++ b/test/test_custom/test_per-vhost.yml @@ -11,7 +11,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example web2: @@ -19,7 +19,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.example regex: @@ -27,5 +27,5 @@ services: expose: - "83" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: ~^regex.*\.nginx-proxy\.example$ diff --git a/test/test_custom/test_proxy-wide.yml b/test/test_custom/test_proxy-wide.yml index 8c81782..199c517 100644 --- a/test/test_custom/test_proxy-wide.yml +++ b/test/test_custom/test_proxy-wide.yml @@ -10,7 +10,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example web2: @@ -18,5 +18,5 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.example diff --git a/test/test_debug-endpoint/test_global.yml b/test/test_debug-endpoint/test_global.yml index 1797038..432b318 100644 --- a/test/test_debug-endpoint/test_global.yml +++ b/test/test_debug-endpoint/test_global.yml @@ -11,7 +11,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: enabled.debug.nginx-proxy.example debug_stripped: @@ -19,7 +19,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST_MULTIPORTS: |- stripped.debug.nginx-proxy.example: "/1": @@ -56,7 +56,7 @@ services: expose: - "83" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: disabled.debug.nginx-proxy.example labels: com.github.nginx-proxy.nginx-proxy.debug-endpoint: "false" diff --git a/test/test_debug-endpoint/test_per-container.yml b/test/test_debug-endpoint/test_per-container.yml index 56c975c..5992e24 100644 --- a/test/test_debug-endpoint/test_per-container.yml +++ b/test/test_debug-endpoint/test_per-container.yml @@ -9,7 +9,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: disabled1.debug.nginx-proxy.example debug_disabled2: @@ -17,7 +17,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: disabled2.debug.nginx-proxy.example @@ -26,7 +26,7 @@ services: expose: - "83" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: enabled.debug.nginx-proxy.example labels: com.github.nginx-proxy.nginx-proxy.debug-endpoint: "true" diff --git a/test/test_default-host/test_default-host.yml b/test/test_default-host/test_default-host.yml index 61b2504..0c0d24c 100644 --- a/test/test_default-host/test_default-host.yml +++ b/test/test_default-host/test_default-host.yml @@ -5,7 +5,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.tld # WHEN nginx-proxy runs with DEFAULT_HOST set to web1.tld diff --git a/test/test_docker-unix-socket/test_docker-unix-socket.yml b/test/test_docker-unix-socket/test_docker-unix-socket.yml index 1c410dc..b86d94c 100644 --- a/test/test_docker-unix-socket/test_docker-unix-socket.yml +++ b/test/test_docker-unix-socket/test_docker-unix-socket.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.tld web2: @@ -12,7 +12,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.tld sut: diff --git a/test/test_dockergen/.gitignore b/test/test_dockergen/.gitignore deleted file mode 100644 index 98c0b06..0000000 --- a/test/test_dockergen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -nginx.tmpl \ No newline at end of file diff --git a/test/test_dockergen/test_dockergen.yml b/test/test_dockergen/test_dockergen.yml index 9b96bb2..f046dbe 100644 --- a/test/test_dockergen/test_dockergen.yml +++ b/test/test_dockergen/test_dockergen.yml @@ -19,7 +19,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: whoami.nginx.container.docker volumes: diff --git a/test/test_headers/test_http.yml b/test/test_headers/test_http.yml index bc18b86..eaef1aa 100644 --- a/test/test_headers/test_http.yml +++ b/test/test_headers/test_http.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web.nginx-proxy.tld web-server-tokens-off: @@ -12,7 +12,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web-server-tokens-off.nginx-proxy.tld SERVER_TOKENS: "off" diff --git a/test/test_headers/test_https.yml b/test/test_headers/test_https.yml index cd9a513..182c47b 100644 --- a/test/test_headers/test_https.yml +++ b/test/test_headers/test_https.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web.nginx-proxy.tld web-server-tokens-off: @@ -12,7 +12,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web-server-tokens-off.nginx-proxy.tld SERVER_TOKENS: "off" diff --git a/test/test_htpasswd/test_htpasswd-regex-virtual-host.yml b/test/test_htpasswd/test_htpasswd-regex-virtual-host.yml index 8eb9012..8ea4111 100644 --- a/test/test_htpasswd/test_htpasswd-regex-virtual-host.yml +++ b/test/test_htpasswd/test_htpasswd-regex-virtual-host.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: ~^regex.*\.nginx-proxy\.example$ sut: diff --git a/test/test_htpasswd/test_htpasswd-virtual-host.yml b/test/test_htpasswd/test_htpasswd-virtual-host.yml index 5848194..a2cda6e 100644 --- a/test/test_htpasswd/test_htpasswd-virtual-host.yml +++ b/test/test_htpasswd/test_htpasswd-virtual-host.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: htpasswd.nginx-proxy.tld sut: diff --git a/test/test_htpasswd/test_htpasswd-virtual-path.yml b/test/test_htpasswd/test_htpasswd-virtual-path.yml index 65fc278..457cdc5 100644 --- a/test/test_htpasswd/test_htpasswd-virtual-path.yml +++ b/test/test_htpasswd/test_htpasswd-virtual-path.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: htpasswd.nginx-proxy.tld VIRTUAL_PATH: /foo/ VIRTUAL_DEST: / diff --git a/test/test_http2/test_http2-global-disabled.yml b/test/test_http2/test_http2-global-disabled.yml index 5dffa19..c13cd68 100644 --- a/test/test_http2/test_http2-global-disabled.yml +++ b/test/test_http2/test_http2-global-disabled.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: http2-global-disabled.nginx-proxy.tld sut: diff --git a/test/test_http3/test_http3-global-disabled.yml b/test/test_http3/test_http3-global-disabled.yml index 5b83119..1650fca 100644 --- a/test/test_http3/test_http3-global-disabled.yml +++ b/test/test_http3/test_http3-global-disabled.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: http3-global-disabled.nginx-proxy.tld sut: diff --git a/test/test_http3/test_http3-global-enabled.yml b/test/test_http3/test_http3-global-enabled.yml index 0825469..a77bca2 100644 --- a/test/test_http3/test_http3-global-enabled.yml +++ b/test/test_http3/test_http3-global-enabled.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: http3-global-enabled.nginx-proxy.tld sut: diff --git a/test/test_http3/test_http3-vhost.yml b/test/test_http3/test_http3-vhost.yml index 1d5cdf2..a1a2007 100644 --- a/test/test_http3/test_http3-vhost.yml +++ b/test/test_http3/test_http3-vhost.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: http3-vhost-enabled.nginx-proxy.tld labels: com.github.nginx-proxy.nginx-proxy.http3.enable: "true" @@ -14,7 +14,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: http3-vhost-disabled.nginx-proxy.tld labels: com.github.nginx-proxy.nginx-proxy.http3.enable: "false" @@ -24,7 +24,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: http3-vhost-default-disabled.nginx-proxy.tld sut: diff --git a/test/test_internal/test_internal-per-vhost.yml b/test/test_internal/test_internal-per-vhost.yml index f01c7cf..2148149 100644 --- a/test/test_internal/test_internal-per-vhost.yml +++ b/test/test_internal/test_internal-per-vhost.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example NETWORK_ACCESS: internal @@ -13,7 +13,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.example sut: diff --git a/test/test_internal/test_internal-per-vpath.yml b/test/test_internal/test_internal-per-vpath.yml index f8e03d6..c587cec 100644 --- a/test/test_internal/test_internal-per-vpath.yml +++ b/test/test_internal/test_internal-per-vpath.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: nginx-proxy.example VIRTUAL_PATH: /web1/ VIRTUAL_DEST: / @@ -15,7 +15,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: nginx-proxy.example VIRTUAL_PATH: /web2/ VIRTUAL_DEST: / diff --git a/test/test_ipv6/test_ipv6-prefer-ipv4-network.yml b/test/test_ipv6/test_ipv6-prefer-ipv4-network.yml index 2021856..bca828e 100644 --- a/test/test_ipv6/test_ipv6-prefer-ipv4-network.yml +++ b/test/test_ipv6/test_ipv6-prefer-ipv4-network.yml @@ -16,7 +16,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: ipv4only.nginx-proxy.tld networks: ipv4net: diff --git a/test/test_ipv6/test_ipv6-prefer-ipv6-network.yml b/test/test_ipv6/test_ipv6-prefer-ipv6-network.yml index b12eb0d..1832932 100644 --- a/test/test_ipv6/test_ipv6-prefer-ipv6-network.yml +++ b/test/test_ipv6/test_ipv6-prefer-ipv6-network.yml @@ -16,7 +16,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: ipv4only.nginx-proxy.tld networks: ipv4net: diff --git a/test/test_ipv6/test_ipv6.yml b/test/test_ipv6/test_ipv6.yml index d7276a6..b937e26 100644 --- a/test/test_ipv6/test_ipv6.yml +++ b/test/test_ipv6/test_ipv6.yml @@ -11,7 +11,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.tld networks: - net1 @@ -21,7 +21,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.tld networks: - net1 diff --git a/test/test_keepalive/test_keepalive.yml b/test/test_keepalive/test_keepalive.yml index 9631eca..2cdfe93 100644 --- a/test/test_keepalive/test_keepalive.yml +++ b/test/test_keepalive/test_keepalive.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: keepalive-disabled.nginx-proxy.test labels: com.github.nginx-proxy.nginx-proxy.keepalive: "disabled" @@ -14,7 +14,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: keepalive-enabled.nginx-proxy.test labels: com.github.nginx-proxy.nginx-proxy.keepalive: "64" @@ -27,7 +27,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: keepalive-auto.nginx-proxy.test sut: diff --git a/test/test_loadbalancing/test_loadbalancing.yml b/test/test_loadbalancing/test_loadbalancing.yml index 46a9916..b041f1f 100644 --- a/test/test_loadbalancing/test_loadbalancing.yml +++ b/test/test_loadbalancing/test_loadbalancing.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: loadbalance-enabled.nginx-proxy.tld labels: com.github.nginx-proxy.nginx-proxy.loadbalance: "hash $$remote_addr;" @@ -16,7 +16,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: loadbalance-disabled.nginx-proxy.tld deploy: replicas: 2 diff --git a/test/test_logs/test_log-disabled.yml b/test/test_logs/test_log-disabled.yml index 05000ef..780a66a 100644 --- a/test/test_logs/test_log-disabled.yml +++ b/test/test_logs/test_log-disabled.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: nginx-proxy.test sut: diff --git a/test/test_logs/test_log-format.yml b/test/test_logs/test_log-format.yml index 211ae31..a6b78f2 100644 --- a/test/test_logs/test_log-format.yml +++ b/test/test_logs/test_log-format.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: nginx-proxy.test sut: diff --git a/test/test_logs/test_log-json-format.yml b/test/test_logs/test_log-json-format.yml index 71810b3..39556e1 100644 --- a/test/test_logs/test_log-json-format.yml +++ b/test/test_logs/test_log-json-format.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: nginx-proxy.test sut: diff --git a/test/test_logs/test_log-json.yml b/test/test_logs/test_log-json.yml index 75bb42e..8c05cb6 100644 --- a/test/test_logs/test_log-json.yml +++ b/test/test_logs/test_log-json.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: nginx-proxy.test sut: diff --git a/test/test_multiple-hosts/test_multiple-hosts.yml b/test/test_multiple-hosts/test_multiple-hosts.yml index d9cb661..bd0b433 100644 --- a/test/test_multiple-hosts/test_multiple-hosts.yml +++ b/test/test_multiple-hosts/test_multiple-hosts.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: webA.nginx-proxy.tld,webB.nginx-proxy.tld sut: diff --git a/test/test_multiple-networks/test_multiple-networks.py b/test/test_multiple-networks/test_multiple-networks.py index cfb4497..daf2b0f 100644 --- a/test/test_multiple-networks/test_multiple-networks.py +++ b/test/test_multiple-networks/test_multiple-networks.py @@ -21,6 +21,5 @@ def test_multipath(docker_compose, nginxproxy): assert r.text == "answer from port 83\n" cfg = nginxproxy.get_conf().decode() lines = cfg.splitlines() - web3_server_lines = [l for l in lines - if re.search(r'(?m)^\s*server\s+[^\s]*:83;\s*$', l)] + web3_server_lines = [l for l in lines if re.search(r'(?m)^\s*server\s+\S*:83;\s*$', l)] assert len(web3_server_lines) == 1 diff --git a/test/test_multiple-networks/test_multiple-networks.yml b/test/test_multiple-networks/test_multiple-networks.yml index edc12ab..1b947c7 100644 --- a/test/test_multiple-networks/test_multiple-networks.yml +++ b/test/test_multiple-networks/test_multiple-networks.yml @@ -20,7 +20,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example networks: - net1 @@ -30,7 +30,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.example networks: - net2 @@ -40,7 +40,7 @@ services: expose: - "83" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: web3.nginx-proxy.test networks: - net3a diff --git a/test/test_nominal/test_nominal.yml b/test/test_nominal/test_nominal.yml index e6b81a8..5e3a846 100644 --- a/test/test_nominal/test_nominal.yml +++ b/test/test_nominal/test_nominal.yml @@ -11,7 +11,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.tld networks: - net1 @@ -21,7 +21,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: web2.nginx-proxy.tld networks: - net1 diff --git a/test/test_raw-ip-vhost/test_raw-ip-vhost.yml b/test/test_raw-ip-vhost/test_raw-ip-vhost.yml index 687449e..d5d9863 100644 --- a/test/test_raw-ip-vhost/test_raw-ip-vhost.yml +++ b/test/test_raw-ip-vhost/test_raw-ip-vhost.yml @@ -13,7 +13,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: "172.20.0.4" networks: net1: @@ -26,7 +26,7 @@ services: expose: - "82" environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: "[fd00::4]" networks: net1: diff --git a/test/test_server-down/test_load-balancing.yml b/test/test_server-down/test_load-balancing.yml index a778157..7818963 100644 --- a/test/test_server-down/test_load-balancing.yml +++ b/test/test_server-down/test_load-balancing.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web.nginx-proxy.tld web2: @@ -12,7 +12,7 @@ services: expose: - "82" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: web.nginx-proxy.tld web3: @@ -20,7 +20,7 @@ services: expose: - "83" environment: - WEB_PORTS: 83 + WEB_PORTS: "83" VIRTUAL_HOST: web.nginx-proxy.tld network_mode: "none" diff --git a/test/test_server-down/test_no-server-down.yml b/test/test_server-down/test_no-server-down.yml index 3ad3668..9a67d8b 100644 --- a/test/test_server-down/test_no-server-down.yml +++ b/test/test_server-down/test_no-server-down.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web.nginx-proxy.tld sut: diff --git a/test/test_server-down/test_server-down.yml b/test/test_server-down/test_server-down.yml index 07dff85..c2f03b4 100644 --- a/test/test_server-down/test_server-down.yml +++ b/test/test_server-down/test_server-down.yml @@ -4,7 +4,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web.nginx-proxy.tld network_mode: "none" diff --git a/test/test_trust-downstream-proxy/test_default.yml b/test/test_trust-downstream-proxy/test_default.yml index a6a7676..8baceb6 100644 --- a/test/test_trust-downstream-proxy/test_default.yml +++ b/test/test_trust-downstream-proxy/test_default.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web.nginx-proxy.tld HTTPS_METHOD: noredirect diff --git a/test/test_trust-downstream-proxy/test_disabled.yml b/test/test_trust-downstream-proxy/test_disabled.yml index 36ca154..6927457 100644 --- a/test/test_trust-downstream-proxy/test_disabled.yml +++ b/test/test_trust-downstream-proxy/test_disabled.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web.nginx-proxy.tld HTTPS_METHOD: noredirect diff --git a/test/test_trust-downstream-proxy/test_enabled.yml b/test/test_trust-downstream-proxy/test_enabled.yml index 800ff6d..7e2420a 100644 --- a/test/test_trust-downstream-proxy/test_enabled.yml +++ b/test/test_trust-downstream-proxy/test_enabled.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web.nginx-proxy.tld HTTPS_METHOD: noredirect diff --git a/test/test_unreachable-network/test_unreachable-network.yml b/test/test_unreachable-network/test_unreachable-network.yml index b6407e1..d1c29cb 100644 --- a/test/test_unreachable-network/test_unreachable-network.yml +++ b/test/test_unreachable-network/test_unreachable-network.yml @@ -18,7 +18,7 @@ services: expose: - 81 environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: webA.nginx-proxy webB: @@ -28,5 +28,5 @@ services: expose: - 82 environment: - WEB_PORTS: 82 + WEB_PORTS: "82" VIRTUAL_HOST: webB.nginx-proxy diff --git a/test/test_upstream-name/test_predictable-name.yml b/test/test_upstream-name/test_predictable-name.yml index 3f8bd7a..aed479a 100644 --- a/test/test_upstream-name/test_predictable-name.yml +++ b/test/test_upstream-name/test_predictable-name.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web.nginx-proxy.tld sut: diff --git a/test/test_upstream-name/test_sha1-name.yml b/test/test_upstream-name/test_sha1-name.yml index 5c3f048..22a97d6 100644 --- a/test/test_upstream-name/test_sha1-name.yml +++ b/test/test_upstream-name/test_sha1-name.yml @@ -4,7 +4,7 @@ services: expose: - "80" environment: - WEB_PORTS: 80 + WEB_PORTS: "80" VIRTUAL_HOST: web.nginx-proxy.tld sut: diff --git a/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.py b/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.py index 0edfb94..6b30b53 100644 --- a/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.py +++ b/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.py @@ -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() diff --git a/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.yml b/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.yml index 16b82e4..01edd72 100644 --- a/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.yml +++ b/test/test_vhost-in-multiple-networks/test_vhost-in-multiple-networks.yml @@ -16,7 +16,7 @@ services: expose: - "81" environment: - WEB_PORTS: 81 + WEB_PORTS: "81" VIRTUAL_HOST: web1.nginx-proxy.example networks: - net1