Set pytest.fixture scope to class, add Swarm E2E tests, and update Docker Swarm configurations
- Modified `pytest.fixture` scope to `class` across tests to improve fixture lifecycle and reduce setup overhead. - Introduced a new `tests_e2e/test_swarm.py` test suite for Docker Swarm stack configurations. - Added E2E tests for Swarm mode with scenarios such as basic services and combined plugins. - Updated HAProxy image in Swarm stack `.yml` files to `byjg/easy-haproxy:local` for local testing consistency. - Added `swarm` marker in `pyproject.toml` for differentiating Docker Swarm-specific tests. - Updated GitHub workflows to include a new Swarm E2E test pipeline.
This commit is contained in:
parent
16fcee4280
commit
d9c7ff89cc
11 changed files with 682 additions and 22 deletions
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
|
|
@ -129,9 +129,33 @@ jobs:
|
|||
export PATH="$HOME/.local/bin:$PATH"
|
||||
uv run pytest tests_e2e/test_proxy_headers.py -sv --tb=short
|
||||
|
||||
Tests-E2E-Swarm:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
needs: [Test]
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
uv sync --group dev
|
||||
|
||||
- name: Run Swarm E2E tests
|
||||
run: |
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
uv run pytest tests_e2e/test_swarm.py -sv --tb=short
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Test, Tests-E2E-Docker, Tests-E2E-Kubernetes, Tests-E2E-Additional]
|
||||
needs: [Test, Tests-E2E-Docker, Tests-E2E-Kubernetes, Tests-E2E-Additional, Tests-E2E-Swarm]
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
|
@ -231,7 +255,7 @@ jobs:
|
|||
|
||||
Publish-PyPI:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Test, Tests-E2E-Docker, Tests-E2E-Kubernetes, Tests-E2E-Additional]
|
||||
needs: [Test, Tests-E2E-Docker, Tests-E2E-Kubernetes, Tests-E2E-Additional, Tests-E2E-Swarm]
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue