You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: flagd Testcontainers module for integration tests #1992
Testing an application that uses the flagd provider against a real flagd currently means hand-rolling a GenericContainer: the image, the start command, ports, readiness, copying flag files in, and TLS. The repo's flagd e2e suite uses the Compose-based test-harness, which is built for conformance testing rather than for consumers' own tests.
Proposal
Add a tools/flagd-testcontainer module (dev.openfeature.contrib.tools:flagd-testcontainer) with a FlagdContainer Testcontainers class:
flags from a classpath resource, host file, JSON string, or any flagd --uri; flags can be replaced while the container runs
mapped ports for the evaluation, sync, OFREP and management services, with readiness on /readyz
TLS, --context-value / --context-from-header, and an escape hatch for other flagd arguments
connection details for the test host and for containers on the same Docker network, including the FLAGD_* environment variables the flagd provider reads and per-source selectors
Its only compile dependency is org.testcontainers:testcontainers.
I have an implementation ready and I'm happy to own the module.
Activity