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.
This commit is contained in:
parent
c125985150
commit
97845b8a52
22 changed files with 1042 additions and 442 deletions
42
tests/fixtures/static.yml
vendored
42
tests/fixtures/static.yml
vendored
|
|
@ -5,27 +5,23 @@ stats:
|
|||
|
||||
customerrors: true # Optional (default false)
|
||||
|
||||
easymapping:
|
||||
- port: 80
|
||||
hosts:
|
||||
host1.com.br:
|
||||
containers:
|
||||
- container:5000
|
||||
certbot: true
|
||||
host2.com.br:
|
||||
containers:
|
||||
- other:3000
|
||||
redirect:
|
||||
www.host1.com.br: http://host1.com.br
|
||||
|
||||
- port: 443
|
||||
ssl: True
|
||||
hosts:
|
||||
host1.com.br:
|
||||
containers:
|
||||
- container:80
|
||||
certbot:
|
||||
email: test@example.com
|
||||
|
||||
- port: 8080
|
||||
hosts:
|
||||
host3.com.br:
|
||||
containers: [ "domain:8181" ]
|
||||
containers:
|
||||
"host1.com.br:80":
|
||||
ip: ["container:5000"]
|
||||
certbot: true
|
||||
|
||||
"host2.com.br:80":
|
||||
ip: ["other:3000"]
|
||||
|
||||
"www.host1.com.br:80":
|
||||
redirect: "http://host1.com.br"
|
||||
|
||||
"host1.com.br:443":
|
||||
ip: ["container:80"]
|
||||
ssl: true
|
||||
|
||||
"host3.com.br:8080":
|
||||
ip: ["domain:8181"]
|
||||
|
|
|
|||
13
tests/fixtures/static_multi_domain.yml
vendored
Normal file
13
tests/fixtures/static_multi_domain.yml
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
stats:
|
||||
username: admin
|
||||
password: test123
|
||||
port: 1936
|
||||
|
||||
customerrors: true
|
||||
|
||||
containers:
|
||||
"host1.com:80":
|
||||
ip: ["webapp:8080"]
|
||||
|
||||
"host2.com:80":
|
||||
ip: ["webapp:8080"] # Same container as host1
|
||||
Loading…
Add table
Add a link
Reference in a new issue