Add tests for plugin integration and improve plugin configuration handling
- Created fixtures for `services-with-cloudflare`, `services-with-deny-pages`, and `services-with-multiple-plugins`. - Added comprehensive test cases for `CloudflarePlugin`, `DenyPagesPlugin`, and `CleanupPlugin`. - Ensured proper configuration propagation to plugins using labels in `easymapping/__init__.py`. - Validated multi-plugin integration and consistent output in HAProxy configuration generation.
This commit is contained in:
parent
113b90a697
commit
91f8ff5d08
5 changed files with 524 additions and 0 deletions
11
src/tests/fixtures/services-with-multiple-plugins
vendored
Normal file
11
src/tests/fixtures/services-with-multiple-plugins
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"192.168.1.30": {
|
||||
"easyhaproxy.http.host": "multi.example.com",
|
||||
"easyhaproxy.http.port": "80",
|
||||
"easyhaproxy.http.localport": "8080",
|
||||
"easyhaproxy.http.plugins": "cloudflare,deny_pages",
|
||||
"easyhaproxy.http.plugin.cloudflare.ip_list_path": "/etc/haproxy/cloudflare_ips.lst",
|
||||
"easyhaproxy.http.plugin.deny_pages.paths": "/admin,/private",
|
||||
"easyhaproxy.http.plugin.deny_pages.status_code": "403"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue