flagd
flagd copied to clipboard
test: using e2e framework to test flagd via go-sdk-contrib flagd provider
depends on:
- https://github.com/open-feature/flagd-testbed/pull/308
- https://github.com/open-feature/go-sdk-contrib/pull/744
Deploy Preview for polite-licorice-3db33c canceled.
| Name | Link |
|---|---|
| Latest commit | 3acf9b1290c1ee97dacbc16f7776c58586254e29 |
| Latest deploy log | https://app.netlify.com/projects/polite-licorice-3db33c/deploys/6924975bc119f800083da8c1 |
/gemini summary
Summary of Changes
This pull request introduces a substantial overhaul of the end-to-end testing infrastructure. The primary goal is to enhance the reliability and maintainability of tests for the flagd provider by adopting a container-based testbed. This change streamlines the test execution process and ensures consistent results across different environments.
Highlights
- E2E Test Framework Migration: The end-to-end testing framework has been refactored to utilize a new testbed approach, moving away from previous test implementations.
- Containerized Test Setup: Tests now leverage
testcontainers-gofor building and managing testbed images, enabling a more isolated and reproducible testing environment. - Dependency Updates: Go module dependencies have been significantly updated, including new additions like
go-git/go-git/v5andtestcontainers/testcontainers-go, and version bumps for existing OpenFeature SDK components. - Test Refactoring: Old test files such as
evaluation_test.goandjson_evaluator_test.gohave been removed, replaced by a unifiedintegration_test.gothat orchestrates RPC and in-process flag evaluation tests.
Changelog
- test-harness
- Updated subproject commit to 'bde8977a4fa2b59ba4359bcf902e9adf4555d085'.
- test/integration/config/envoy.yaml
- Removed Envoy configuration file, indicating a change in the test setup's networking or proxying strategy.
- test/integration/evaluation_test.go
- Removed the legacy evaluation test file.
- test/integration/go.mod
- Changed module name from 'tests.integration' to 'integration_test'.
- Updated various Go module dependencies, including
github.com/cucumber/godog,github.com/open-feature/go-sdk, andgithub.com/open-feature/go-sdk-contrib/providers/flagd. - Added new dependencies:
github.com/go-git/go-git/v5andgithub.com/testcontainers/testcontainers-go.
- test/integration/go.sum
- Updated checksums for Go module dependencies to reflect changes in
go.mod.
- Updated checksums for Go module dependencies to reflect changes in
- test/integration/integration_test.go
- Removed old TLS and certificate path flags.
- Introduced
getGitCommitNativeandgetPlatformhelper functions. - Implemented
TestMainfor global test setup, including buildingflagd-testbedimages. - Added
setupFlagdTestbed,buildFlagdImage, andbuildTestbedImagefunctions for Docker image management usingtestcontainers-go. - Introduced
TestRPCandTestInProcessfunctions to run Gherkin tests against different flag resolution types, with specific tag filtering.
- test/integration/json_evaluator_test.go
- Removed the legacy JSON evaluator test file.
Ignored Files
- Ignored by pattern:
.github/workflows/**(1)- .github/workflows/build.yaml
Activity
- A deploy preview for 'polite-licorice-3db33c' was canceled by netlify[bot].
- SonarQube Cloud reported a 'Quality Gate failed' due to 1 Security Hotspot.
- The author, aepfli, requested a summary of the pull request.
