1
0
Fork 0
Commit graph

39 commits

Author SHA1 Message Date
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
2e45c3f2e5 Add unit and integration tests for Certbot and HAProxy configuration
- Added integration tests to validate HAProxy configuration generation for Certbot's HTTP-01 challenges.
- Verified handling of ACLs, SSL redirects, multi-domain setups, and backend behaviors.
- Introduced unit tests for the Certbot class to ensure proper ACME server handling, certificate status checks, and configuration validation.
- Improved test coverage for edge cases, including EAB credentials, manual hooks, and custom ports.
- Enhanced certbot-related environment variable parsing and error scenarios.
2026-02-14 16:59:22 -05:00
Joao Gilberto Magalhaes
ece012a884 Introduce plugin initialization phase and consolidate config handling
- Added `initialize_plugins` method to `PluginManager` for requesting and processing file system resources during plugin initialization.
- Introduced `InitializationResult` and `ResourceRequest` structures for fine-grained resource management (e.g., directories, files).
- Enhanced configuration injection by separating `global_configs`, `defaults_configs`, and backend-level `haproxy_config`.
- Updated existing plugins (e.g., JWT Validator, Cloudflare) to use the initialization phase for resource setup.
- Simplified domain plugin execution by consolidating configuration logic into unified loops.
2026-02-13 16:14:05 -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
1fd5873dc9 Add Cloudflare plugin tests with base64-encoded IP list support
- Enhanced the Cloudflare plugin by adding support for base64-encoded IP lists, prioritizing them over built-in lists.
- Introduced Kubernetes integration tests for the Cloudflare IP restoration feature.
- Validated plugin behavior for resource creation, pod readiness, ingress access, and HAProxy configurations.
- Improved annotations in `cloudflare.yml` for Kubernetes-native compatibility.
- Updated unit tests to cover IP list precedence, invalid base64 handling, and metadata verification.
2026-02-12 16:03:50 -05:00
Joao Gilberto Magalhaes
90b01b1f13 Add Kubernetes integration tests for EasyHAProxy examples
- Introduced a suite of pytest-based integration tests for Kubernetes using `kind`.
- Automated local installation of dependencies (`kind`, `kubectl`, and `helm`) when missing.
- Implemented fixtures for Kubernetes resource management and TLS secrets.
- Added end-to-end tests for HTTP and HTTPS ingress functionality.
2026-02-12 01:42:43 -05:00
Joao Gilberto Magalhaes
5767e55dea Refactor Docker Compose examples and plugins, add pytest tests
- Adjusted Compose files to build images locally instead of pulling.
- Simplified examples by removing `/etc/hosts` entry instructions.
- Enhanced `cloudflare.py` plugin with a configurable log format.
- Improved `generate-keys.sh` for portability using `$SCRIPT_DIR`.
- Added end-to-end tests for Compose examples using pytest.
2026-02-11 19:19:08 -05:00
Joao Gilberto Magalhaes
dc28b18351 Fix lint errors 2026-01-22 22:05:49 -05:00
Joao Gilberto Magalhaes
62e5c054f4 Refactor: modernize codebase by replacing deprecated patterns, simplifying imports, and applying type hinting refinements. 2026-01-22 21:47:33 -05:00
Joao Gilberto Magalhaes
55d0d1a105 Modernizing PyThon Projec 2026-01-22 20:14:22 -05:00
Joao M
7d959f892a Refactoring to Python 2022-08-24 01:00:26 +00:00
Joao M
78e9ae3d08 Documentation Update 2022-08-18 17:37:37 +00:00
Joao M
2e2640c859 Fix tests 2022-08-18 15:24:55 +00:00
Joao M
e6d5842098 Change statistics 2022-08-18 04:00:52 +00:00
Joao M
fee0126442 Fixed 2022-08-17 22:04:10 +00:00
Joao M
ad8aef16a2 Fix SSL 2022-08-17 21:55:25 +00:00
Joao M
1a6472a5b3 Fix loop in redirect_ssl 2022-08-17 02:28:24 +00:00
Joao M
0a4f78a153 Fix redirect loop 2022-08-16 20:34:32 +00:00
Joao M
3e561e557f Change SSL Certs folder 2022-08-16 20:07:57 +00:00
Joao M
b363abea8c Add redirect-ssl and different ssl_modes 2022-08-16 16:39:51 +00:00
Joao M
d0f91c6718 Multiple Hosts 2022-08-15 20:20:18 +00:00
Joao M
c62db6e573 Change redirect label to JSON 2022-08-15 19:39:25 +00:00
Joao M
076a51d143 Enforcing some SSL configurations 2022-08-15 17:02:55 +00:00
Joao M
22cac26555 Some controls improvements for certbot. 2022-08-15 14:27:49 +00:00
Joao M
9fa9dc9841 Some refactory to support letsencrypt 2022-08-15 04:31:50 +00:00
Joao M
bdc97fa10d Fixing HAProxy conditional 2022-08-15 01:17:54 +00:00
Joao M
10ed037d94 First part letsencrypt 2022-08-15 00:34:45 +00:00
Joao M
4a1c36d003 Find definitions dynamically 2022-08-12 14:49:48 +00:00
Joao M
c62834c52b Inverted order of the definitions 2022-08-12 02:01:11 +00:00
Joao M
d278629671 Organizing code to refactory labels 2022-08-12 01:00:18 +00:00
Joao M
c6bef882ca Add unit tests 2022-08-11 22:18:28 +00:00
Joao Gilberto Magalhaes
50af051a33 Added tests for multi-container 2022-03-27 18:52:52 -05:00
zhipeng
d41364f1af support multi containers 2022-03-27 16:28:54 +08:00
Joao Gilberto
13c4ebfd2d Reduce the label name 2021-08-11 10:54:17 -05:00
Joao Gilberto Magalhães
74413882fa Fix SSL Parsing; Changed all tests; 2020-06-07 22:31:00 -05:00
Joao Gilberto Magalhães
ddfa2e34ae Minor adjustment in Static unittest. 2020-06-07 21:36:02 -05:00
till
75deebc783
Update: more tests and ssl health-check
- restructure more tests for the "mode http"
 - add tests tests for "mode tcp"
 - add the ability to ssl health check on a backend (in mode tcp)
2020-06-05 16:50:04 +02:00
till
08de132450
Refactor: tried to refactor code
- move scripts to assets/scripts (and updated build)
 - put most logic into HaproxyConfigGenerator
 - created DockerLabelHandler for all label handling from previous code
 - added unit tests and fixtures to cover HaproxyConfigGenerator and DockerLabelHandler
 - added a Makefile with build (for docker build) and test targets
2020-06-05 16:46:40 +02:00