Open
Conversation
Implements comprehensive end-to-end testing framework with: - Docker-based test environment (Server, Client, OPA, PostgreSQL) - Health check endpoint validation - Statistics API verification for client-server connectivity - Log analysis for errors and critical alerts - 33 automated tests covering all core functionality Test execution: - Single command: make e2e-test - Tests run in ~22 seconds - Uses isolated ports (17002, 17000, 18181) to avoid conflicts Framework structure: - tests/e2e/conftest.py: pytest fixtures for Docker lifecycle - tests/e2e/utils/: Docker manager, HTTP client, log parser utilities - tests/e2e/test_*.py: Test suites for health, stats, connectivity, logs - tests/e2e/docker_compose.yml: Test environment configuration
✅ Deploy Preview for opal-docs canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OPAL_E2E_pytest.py_status.mp4
#677
Implements a full end-to-end testing framework that validates the entire OPAL stack running together in Docker.
This work focuses on confidence, not just coverage. The goal is to prove that the client, server, and OPA start cleanly, communicate correctly, and do not fail silently during startup.
What I did
I added a pytest-based end-to-end test suite using session-scoped fixtures that spin up the real Docker Compose environment once per test run. All tests execute against the same running containers to avoid unnecessary teardown and rebuild cycles.
The tests interact with the system exactly as it runs in practice. Nothing is mocked.
How this is verified
The tests use concrete signals to validate correctness:
If the system looks healthy but logs contain serious errors, the tests fail.
Test execution
All tests can be run with a single command:
make e2e-test
This command:
The full suite runs in approximately 20 to 25 seconds.
To avoid conflicts with local OPAL setups, the Docker services are mapped to non-standard ports (17002, 17000, 18181).
Test structure
• tests/e2e/conftest.py
Session-scoped pytest fixtures managing Docker lifecycle
• tests/e2e/utils/
Docker manager, HTTP client with retries, and log parsing utilities
• tests/e2e/test_*.py
End-to-end tests for health, statistics, connectivity, and logs
• tests/e2e/docker_compose.yml
Isolated Docker Compose configuration for testing
Why this matters
This covers all acceptance criteria from the issue and provides a fast, repeatable way to verify that the entire stack comes up healthy.
If something breaks during startup, we find out immediately instead of discovering it later in production.
Demo video
A short video demonstrating
make e2e-testrunning locally is attached above. It shows the Docker environment starting, tests executing against live containers, and all checks passing with clean logs.Notes
Happy to adjust test placement, signals, or structure if there is a preferred pattern for this repository.