1
0
Fork 0
Commit graph

19 commits

Author SHA1 Message Date
Joao Gilberto Magalhaes
44cb3dd5e0 Refactor Dockerfile for multi-stage build and runtime optimization
- Implemented a two-stage Dockerfile: build environment with Python dependencies and lean runtime stage with HAProxy.
- Added custom entrypoint script for dynamic Docker group adjustment.
- Improved HAProxy command generation by introducing a static method for binary resolution.
- Updated tests and functional logic to dynamically resolve the `haproxy` binary path.
- Adjusted file permissions in E2E key generation script for better security.
- Streamlined `.gitignore` by removing unnecessary exclusions.
2026-02-18 01:53:27 -05:00
Joao Gilberto Magalhaes
3805100244 Refactor E2E tests: add wait_for_json_response helper for robust JSON response handling
- Replaced direct `curl` calls with `wait_for_json_response` to improve retry logic and error handling.
- Simplified tests for header validation and backend readiness verification.
2026-02-17 16:13:40 -05:00
Joao Gilberto Magalhaes
776f216a36 Add support for proxy-awareness headers: X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto, X-Forwarded-Host, and X-Request-ID
- Updated HAProxy configuration template to set all standard proxy headers for HTTP requests.
- Added support for a unique request ID via `unique-id-format` and `unique-id-header` directives.
- Implemented E2E tests for header validation, request correlation, and configuration correctness.
- Enhanced documentation to explain usage and examples of proxy headers.
- Updated CI workflows to include E2E tests for proxy headers.
2026-02-16 17:26:59 -05:00
Joao Gilberto Magalhaes
c340de1d9d Refactor ACME E2E tests: add Pebble health check container, simplify startup logic, and replace Python-based health check 2026-02-16 14:48:39 -05:00
Joao Gilberto Magalhaes
4646572953 Update ACME E2E tests: use specific Docker Compose file and ensure correct working directory
- Replaced `compose_file` references with `docker-compose-acme-e2e.yml` for improved clarity.
- Added working directory changes for Docker Compose commands to ensure relative paths work properly.
- Restored original working directory after test execution for cleanup consistency.
2026-02-16 14:20:02 -05:00
Joao Gilberto Magalhaes
6997777f41 Add Pebble readiness debug logs and skip ACME tests in specific CI environments 2026-02-16 14:07:29 -05:00
Joao Gilberto Magalhaes
9d1e947675 Refactor ACME/Certbot E2E test fixture to use staged service startup for improved reliability 2026-02-16 13:50:25 -05:00
Joao Gilberto Magalhaes
1493beb227 Remove Pebble health check container and replace with Python-based health check in E2E tests 2026-02-16 13:18:35 -05:00
Joao Gilberto Magalhaes
b867bb724d Adjust health checks and retry logic in E2E tests for improved CI reliability 2026-02-16 12:48:59 -05:00
Joao Gilberto Magalhaes
aa518e9686 Adjust health checks and retry logic in E2E tests for improved CI reliability 2026-02-16 12:13:13 -05:00
Joao Gilberto Magalhaes
4df8666a2b Add health checks for Docker services, ACME environment readiness validation, and Certbot unit tests
- Introduced health checks to Docker Compose files for better service reliability.
- Added ACME environment readiness validation to ensure proper configuration for Certbot.
- Implemented unit tests for Certbot's `check_acme_environment_ready` method to cover edge cases.
- Improved E2E tests with startup wait adjustments and dynamic certificate issuance verification.
- Enhanced Kubernetes test cleanup with forced resource deletion for faster termination.
2026-02-16 11:47:28 -05:00
Joao Gilberto Magalhaes
045dd3817e Migrate configuration paths to /etc/easyhaproxy and improve health check support in E2E tests
- Refactored HAProxy configuration files, templates, and paths to use `/etc/easyhaproxy` instead of `/etc/haproxy`.
- Updated Dockerfile to generate DH params and placeholder certificates in the new configuration directory.
- Added health check support with timeout to `DockerComposeFixture` in E2E test utilities.
- Adjusted tests, templates, and plugins to use the new `Consts`-based configuration paths.
- Introduced pytest fixtures for environment isolation and temporary directory management.
2026-02-15 14:32:16 -05:00
Joao Gilberto Magalhaes
3e963228f3 Add ACME/Certbot E2E tests with Pebble integration and update dependencies in CI workflows
- Introduced `docker-compose-acme-e2e.yml` for end-to-end testing with Pebble test server.
- Added tests to validate ACME challenge routing, certificate issuance, HTTPS functionality, and HAProxy configuration.
- Implemented CA certificate download fixture (`create_pebble_ca_file`) for test session initialization.
- Updated `.gitignore` to exclude Pebble-related files.
- Modified CI workflows to include `needs: [Test]` dependencies for E2E jobs, ensuring proper sequencing.
2026-02-14 17:40:40 -05:00
Joao Gilberto Magalhaes
97845b8a52 Refactor E2E tests and configuration format
- Replaced `easymapping` configuration with `containers` for better maintainability and clarity.
- Introduced `DockerComposeFixture` class in `utils.py` to manage Docker Compose lifecycle and smart build strategy.
- Enhanced YAML-to-environment variable conversion in `ContainerEnv` for dynamic configuration support.
- Updated HAProxy configurations and test fixtures to reflect the new format.
- Improved test coverage for YAML parsing, environment variable handling, and HAProxy config generation.
2026-02-13 12:01:47 -05:00
Joao Gilberto Magalhaes
c125985150 Refactor Docker Compose E2E tests: consolidate file creation and optimize build strategy
- Added `create_cloudflare_ips_file` to centralize `cloudflare_ips.lst` creation and avoid redundant logic.
- Introduced a global flag `_docker_image_built` for smart Docker image build management.
- Improved test output readability with refined print formatting.
- Simplified `docker_compose_cloud
2026-02-12 18:48:24 -05:00
Joao Gilberto Magalhaes
904a102b0a Enhance logging and error handling in E2E tests and CI workflows
- Added detailed log messages in `conftest.py` for SSL certificate and JWT generation steps.
- Improved Docker Compose E2E test output with service-specific logs during startup and cleanup.
- Adjusted pytest run options in CI workflows to use `--tb=short` for concise error traceback.
2026-02-12 18:26:59 -05:00
Joao Gilberto Magalhaes
0a400b976c Add improved output formatting and new manual test workflows
- Added blank lines before specific print statements in E2E test scripts for better readability.
- Enabled `workflow_dispatch` in `.github/workflows/build.yml` to allow manual triggering of workflows.
- Added separate jobs for running Docker Compose and Kubernetes E2E tests in CI pipeline.
2026-02-12 18:07:01 -05:00
Joao Gilberto Magalhaes
f463020e3e Refactor and consolidate E2E test utilities and fixtures
- Introduced `utils.py` for shared test utility functions (e.g., JWT generation, pod readiness checks, etc.).
- Added shared pytest fixtures in `conftest.py`, eliminating redundancy across Kubernetes and Docker Compose tests.
- Replaced inline test logic with reusable helper functions for Kubernetes configuration validation and resource readiness.
- Updated tests to leverage new consolidated functionality for better maintainability and clarity.
- Removed outdated, duplicate code in test files, aligning with new utilities and fixture structure.
2026-02-12 17:55:09 -05:00
Joao Gilberto Magalhaes
d66c4f8595 Migrate examples to tests_e2e directory structure
- Relocated all files and scripts from `examples` to `tests_e2e` for better organization.
- Updated references and paths in configurations, scripts, and test files.
- Adjusted `bump-version.sh` to handle the new `tests_e2e` structure.
- Updated `.gitignore` to reflect path changes.
2026-02-12 17:05:04 -05:00