From 5ef2e31687d151cc01dde44525de6cf82f21ef9b Mon Sep 17 00:00:00 2001 From: Nicolas Duchon Date: Sun, 22 Dec 2024 20:27:24 +0100 Subject: [PATCH] test: separate containers (contd) --- test/test_DOCKER_HOST_unix_socket.yml | 3 +-- .../test_acme_challenge_location_legacy.yml | 3 +-- test/test_debug_endpoint/test_global.yml | 3 +-- test/test_default-host.yml | 3 +-- test/test_enable_http_on_missing_cert.yml | 3 +-- test/test_fallback.data/nohttp-on-app.yml | 3 +-- .../nohttp-with-missing-cert.yml | 3 +-- test/test_fallback.data/nohttp.yml | 3 +-- test/test_fallback.data/nohttps-on-app.yml | 3 +-- test/test_fallback.data/nohttps.yml | 3 +-- test/test_fallback.data/untrusteddefault.yml | 3 +-- .../test_proxy-host-network-mode.yml | 3 +-- .../test_http2/test_http2_global_disabled.yml | 3 +-- test/test_http3/test_http3_global_enabled.yml | 3 +-- test/test_http_port.yml | 3 +-- test/test_ipv6/test_ipv6.yml | 3 +-- .../test_ipv6_prefer_ipv4_network.yml | 3 +-- .../test_ipv6_prefer_ipv6_network.yml | 6 ++--- test/test_keepalive.yml | 3 +-- test/test_logs/test_log_disabled.yml | 3 +-- test/test_logs/test_log_format.yml | 3 +-- test/test_logs/test_log_json.yml | 3 +-- test/test_logs/test_log_json_format.yml | 3 +-- test/test_multiple-networks.yml | 6 ++--- test/test_server-down/test_load-balancing.yml | 26 ++++++++++++++++++- test/test_server-down/test_no-server-down.yml | 26 ++++++++++++++++++- test/test_server-down/test_server-down.yml | 26 ++++++++++++++++++- 27 files changed, 101 insertions(+), 55 deletions(-) diff --git a/test/test_DOCKER_HOST_unix_socket.yml b/test/test_DOCKER_HOST_unix_socket.yml index d9240b1..01839bf 100644 --- a/test/test_DOCKER_HOST_unix_socket.yml +++ b/test/test_DOCKER_HOST_unix_socket.yml @@ -35,8 +35,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sutnginx: profiles: diff --git a/test/test_acme_http_challenge_location/test_acme_challenge_location_legacy.yml b/test/test_acme_http_challenge_location/test_acme_challenge_location_legacy.yml index 0c5af34..9a64598 100644 --- a/test/test_acme_http_challenge_location/test_acme_challenge_location_legacy.yml +++ b/test/test_acme_http_challenge_location/test_acme_challenge_location_legacy.yml @@ -35,8 +35,7 @@ services: profiles: - separateContainers image: nginxproxy/nginx-proxy:test-dockergen - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket diff --git a/test/test_debug_endpoint/test_global.yml b/test/test_debug_endpoint/test_global.yml index 2b385e4..db61c7b 100644 --- a/test/test_debug_endpoint/test_global.yml +++ b/test/test_debug_endpoint/test_global.yml @@ -19,8 +19,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv nginx-proxy-nginx: profiles: diff --git a/test/test_default-host.yml b/test/test_default-host.yml index da121f9..a8dfbff 100644 --- a/test/test_default-host.yml +++ b/test/test_default-host.yml @@ -24,8 +24,7 @@ services: profiles: - separateContainers image: nginxproxy/nginx-proxy:test-dockergen - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket diff --git a/test/test_enable_http_on_missing_cert.yml b/test/test_enable_http_on_missing_cert.yml index 3d46525..c2e2a7b 100644 --- a/test/test_enable_http_on_missing_cert.yml +++ b/test/test_enable_http_on_missing_cert.yml @@ -17,8 +17,7 @@ services: profiles: - separateContainers image: nginxproxy/nginx-proxy:test-dockergen - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket diff --git a/test/test_fallback.data/nohttp-on-app.yml b/test/test_fallback.data/nohttp-on-app.yml index 3d7c22f..0b0ea1d 100644 --- a/test/test_fallback.data/nohttp-on-app.yml +++ b/test/test_fallback.data/nohttp-on-app.yml @@ -21,8 +21,7 @@ services: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - *certs - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_fallback.data/nohttp-with-missing-cert.yml b/test/test_fallback.data/nohttp-with-missing-cert.yml index 249d263..eb82b9a 100644 --- a/test/test_fallback.data/nohttp-with-missing-cert.yml +++ b/test/test_fallback.data/nohttp-with-missing-cert.yml @@ -21,8 +21,7 @@ services: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - *certs - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_fallback.data/nohttp.yml b/test/test_fallback.data/nohttp.yml index 12d0d3f..a64e0ba 100644 --- a/test/test_fallback.data/nohttp.yml +++ b/test/test_fallback.data/nohttp.yml @@ -21,8 +21,7 @@ services: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - *certs - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_fallback.data/nohttps-on-app.yml b/test/test_fallback.data/nohttps-on-app.yml index 8b52d64..8b2a4a6 100644 --- a/test/test_fallback.data/nohttps-on-app.yml +++ b/test/test_fallback.data/nohttps-on-app.yml @@ -19,8 +19,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_fallback.data/nohttps.yml b/test/test_fallback.data/nohttps.yml index 12da838..e382ba3 100644 --- a/test/test_fallback.data/nohttps.yml +++ b/test/test_fallback.data/nohttps.yml @@ -19,8 +19,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_fallback.data/untrusteddefault.yml b/test/test_fallback.data/untrusteddefault.yml index dac46c2..ffd6d12 100644 --- a/test/test_fallback.data/untrusteddefault.yml +++ b/test/test_fallback.data/untrusteddefault.yml @@ -21,8 +21,7 @@ services: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - *certs - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_host-network-mode/test_proxy-host-network-mode.yml b/test/test_host-network-mode/test_proxy-host-network-mode.yml index efd1d8e..d9c3d1d 100644 --- a/test/test_host-network-mode/test_proxy-host-network-mode.yml +++ b/test/test_host-network-mode/test_proxy-host-network-mode.yml @@ -36,8 +36,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_http2/test_http2_global_disabled.yml b/test/test_http2/test_http2_global_disabled.yml index 312c3fb..5e9dd46 100644 --- a/test/test_http2/test_http2_global_disabled.yml +++ b/test/test_http2/test_http2_global_disabled.yml @@ -27,8 +27,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_http3/test_http3_global_enabled.yml b/test/test_http3/test_http3_global_enabled.yml index 8337104..6ba7587 100644 --- a/test/test_http3/test_http3_global_enabled.yml +++ b/test/test_http3/test_http3_global_enabled.yml @@ -27,8 +27,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_http_port.yml b/test/test_http_port.yml index 65eece1..2051c74 100644 --- a/test/test_http_port.yml +++ b/test/test_http_port.yml @@ -27,8 +27,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_ipv6/test_ipv6.yml b/test/test_ipv6/test_ipv6.yml index b99df50..436fdec 100644 --- a/test/test_ipv6/test_ipv6.yml +++ b/test/test_ipv6/test_ipv6.yml @@ -48,8 +48,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv networks: - net1 diff --git a/test/test_ipv6/test_ipv6_prefer_ipv4_network.yml b/test/test_ipv6/test_ipv6_prefer_ipv4_network.yml index 04a56de..74b5e28 100644 --- a/test/test_ipv6/test_ipv6_prefer_ipv4_network.yml +++ b/test/test_ipv6/test_ipv6_prefer_ipv4_network.yml @@ -55,8 +55,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - networks: - <<: *nginxProxyNetworks + networks: *nginxProxyNetworks sut-nginx: profiles: diff --git a/test/test_ipv6/test_ipv6_prefer_ipv6_network.yml b/test/test_ipv6/test_ipv6_prefer_ipv6_network.yml index dddafaf..75c28e9 100644 --- a/test/test_ipv6/test_ipv6_prefer_ipv6_network.yml +++ b/test/test_ipv6/test_ipv6_prefer_ipv6_network.yml @@ -57,10 +57,8 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv - networks: - <<: *nginxProxyNetworks + environment: *nginxProxyEnv + networks: *nginxProxyNetworks sut-nginx: profiles: diff --git a/test/test_keepalive.yml b/test/test_keepalive.yml index 54939ae..26744c8 100644 --- a/test/test_keepalive.yml +++ b/test/test_keepalive.yml @@ -50,8 +50,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_logs/test_log_disabled.yml b/test/test_logs/test_log_disabled.yml index 1c1203b..f3ff65d 100644 --- a/test/test_logs/test_log_disabled.yml +++ b/test/test_logs/test_log_disabled.yml @@ -28,8 +28,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_logs/test_log_format.yml b/test/test_logs/test_log_format.yml index 6b656b6..161f241 100644 --- a/test/test_logs/test_log_format.yml +++ b/test/test_logs/test_log_format.yml @@ -28,8 +28,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_logs/test_log_json.yml b/test/test_logs/test_log_json.yml index 54d11f2..163c0bd 100644 --- a/test/test_logs/test_log_json.yml +++ b/test/test_logs/test_log_json.yml @@ -28,8 +28,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_logs/test_log_json_format.yml b/test/test_logs/test_log_json_format.yml index 386aeae..a26daca 100644 --- a/test/test_logs/test_log_json_format.yml +++ b/test/test_logs/test_log_json_format.yml @@ -28,8 +28,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - environment: - <<: *nginxProxyEnv + environment: *nginxProxyEnv sut-nginx: profiles: diff --git a/test/test_multiple-networks.yml b/test/test_multiple-networks.yml index 4c25816..8ec659f 100644 --- a/test/test_multiple-networks.yml +++ b/test/test_multiple-networks.yml @@ -29,8 +29,7 @@ services: volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - networks: - <<: *nginxProxyNetworks + networks: *nginxProxyNetworks nginx-proxy-nginx: profiles: @@ -41,8 +40,7 @@ services: - *confVolume labels: - "com.github.nginx-proxy.nginx-proxy.nginx" - networks: - <<: *nginxProxyNetworks + networks: *nginxProxyNetworks web1: image: web diff --git a/test/test_server-down/test_load-balancing.yml b/test/test_server-down/test_load-balancing.yml index a778157..af0c620 100644 --- a/test/test_server-down/test_load-balancing.yml +++ b/test/test_server-down/test_load-balancing.yml @@ -1,3 +1,7 @@ +volumes: + nginx_conf: + + services: web1: image: web @@ -25,6 +29,26 @@ services: network_mode: "none" sut: + profiles: + - singleContainer image: nginxproxy/nginx-proxy:test volumes: - - /var/run/docker.sock:/tmp/docker.sock:ro + - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro + + sut-dockergen: + profiles: + - separateContainers + image: nginxproxy/nginx-proxy:test-dockergen + volumes: + - &confVolume nginx_conf:/etc/nginx/conf.d + - *dockerSocket + + sut-nginx: + profiles: + - separateContainers + container_name: nginx-proxy + image: nginx:alpine + volumes: + - *confVolume + labels: + - "com.github.nginx-proxy.nginx-proxy.nginx" diff --git a/test/test_server-down/test_no-server-down.yml b/test/test_server-down/test_no-server-down.yml index 3ad3668..cfbe7c8 100644 --- a/test/test_server-down/test_no-server-down.yml +++ b/test/test_server-down/test_no-server-down.yml @@ -1,3 +1,7 @@ +volumes: + nginx_conf: + + services: web: image: web @@ -8,6 +12,26 @@ services: VIRTUAL_HOST: web.nginx-proxy.tld sut: + profiles: + - singleContainer image: nginxproxy/nginx-proxy:test volumes: - - /var/run/docker.sock:/tmp/docker.sock:ro + - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro + + sut-dockergen: + profiles: + - separateContainers + image: nginxproxy/nginx-proxy:test-dockergen + volumes: + - &confVolume nginx_conf:/etc/nginx/conf.d + - *dockerSocket + + sut-nginx: + profiles: + - separateContainers + container_name: nginx-proxy + image: nginx:alpine + volumes: + - *confVolume + labels: + - "com.github.nginx-proxy.nginx-proxy.nginx" diff --git a/test/test_server-down/test_server-down.yml b/test/test_server-down/test_server-down.yml index 07dff85..0e09abf 100644 --- a/test/test_server-down/test_server-down.yml +++ b/test/test_server-down/test_server-down.yml @@ -1,3 +1,7 @@ +volumes: + nginx_conf: + + services: web: image: web @@ -9,6 +13,26 @@ services: network_mode: "none" sut: + profiles: + - singleContainer image: nginxproxy/nginx-proxy:test volumes: - - /var/run/docker.sock:/tmp/docker.sock:ro + - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro + + sut-dockergen: + profiles: + - separateContainers + image: nginxproxy/nginx-proxy:test-dockergen + volumes: + - &confVolume nginx_conf:/etc/nginx/conf.d + - *dockerSocket + + sut-nginx: + profiles: + - separateContainers + container_name: nginx-proxy + image: nginx:alpine + volumes: + - *confVolume + labels: + - "com.github.nginx-proxy.nginx-proxy.nginx"