-
Notifications
You must be signed in to change notification settings - Fork 273
Description
I'm interested in implementing the E2E testing framework using PyTest. My plan is as follows:
Framework Selection: Use pytest as the core runner with pytest-asyncio for handling OPAL's asynchronous nature (WebSockets/PubSub).
Environment Orchestration: Implement a docker-compose fixture (or use testcontainers-python) to spin up:
A local Git server (or mock git repo) to mimic policy updates.
OPAL Server.
OPAL Client.
OPA (Open Policy Agent) as the policy engine.
Test Scenarios:
Policy Sync: Modify a Rego file in the mock Git repo and verify the change is propagated to OPA through OPAL.
Data Sync: Update a data.json file and verify the data reaches the policy engine.
Health Checks: Verify that the OPAL server correctly reports the health of its workers and connections.
Utility Layer: Create reusable fixtures for:
Waiting for OPAL services to be "Ready".
Mocking GitHub/GitLab webhooks to trigger immediate syncs.
Documentation & Demo: Provide a README.md on how to run the E2E suite and a recording of the test execution.