1
0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2025-07-21 19:44:19 +02:00
nginx-proxy/test/stress_tests/test_deleted_cert
Richard Hansen 8fbc8514ef feat: Unconditionally produce debug comments
Rationale for eliminating the check to see if the `DEBUG` environment
variable holds a true value:
  * The `DEBUG` environment variable might be set on a container (for
    purposes specific to that container, not `nginx-proxy`) to a value
    that cannot be parsed as a bool, which would break `nginx-proxy`.
  * It simplifies the template.
  * It eliminates a cold code path.
  * It avoids heisenbugs.
  * It makes debugging easier for users.

Also delete the debug info tests, as they are fragile and they provide
limited value.

Alternatively, we could avoid collision with the container's use of
the `DEBUG` environment variable by using a container label [1] such
as `com.google.nginx-proxy.nginx-proxy.debug`.  I think doing so has
dubious value, especially if we want to attempt backwards
compatibility with the `DEBUG` environment variable.

Fixes #2139

[1] https://docs.docker.com/engine/reference/commandline/run/#-set-metadata-on-container--l---label---label-file

Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
2023-01-18 17:27:04 -05:00
..
certs TESTS: add stress test when a certificate file is missing 2017-03-08 21:21:32 +01:00
tmp_certs TESTS: add stress test when a certificate file is missing 2017-03-08 21:21:32 +01:00
docker-compose.yml feat: Unconditionally produce debug comments 2023-01-18 17:27:04 -05:00
README.md TESTS: add stress test when a certificate file is missing 2017-03-08 21:21:32 +01:00
test_restart_while_missing_cert.py tests: mark test_deleted_cert as xfail 2021-12-15 13:01:38 +01:00

Test the behavior of nginx-proxy when restarted after deleting a certificate file is was using.

  1. nginx-proxy is created with a virtual host having a certificate
  2. while nginx-proxy is running, the certificate file is deleted
  3. nginx-proxy is then restarted (without removing the container)