flagd icon indicating copy to clipboard operation
flagd copied to clipboard

test: using e2e framework to test flagd via go-sdk-contrib flagd provider

Open aepfli opened this issue 4 weeks ago • 4 comments

depends on:

  • https://github.com/open-feature/flagd-testbed/pull/308
  • https://github.com/open-feature/go-sdk-contrib/pull/744

aepfli avatar Oct 31 '25 16:10 aepfli

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

netlify[bot] avatar Oct 31 '25 16:10 netlify[bot]

/gemini summary

aepfli avatar Nov 03 '25 06:11 aepfli

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-go for 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/v5 and testcontainers/testcontainers-go, and version bumps for existing OpenFeature SDK components.
  • Test Refactoring: Old test files such as evaluation_test.go and json_evaluator_test.go have been removed, replaced by a unified integration_test.go that 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, and github.com/open-feature/go-sdk-contrib/providers/flagd.
    • Added new dependencies: github.com/go-git/go-git/v5 and github.com/testcontainers/testcontainers-go.
  • test/integration/go.sum
    • Updated checksums for Go module dependencies to reflect changes in go.mod.
  • test/integration/integration_test.go
    • Removed old TLS and certificate path flags.
    • Introduced getGitCommitNative and getPlatform helper functions.
    • Implemented TestMain for global test setup, including building flagd-testbed images.
    • Added setupFlagdTestbed, buildFlagdImage, and buildTestbedImage functions for Docker image management using testcontainers-go.
    • Introduced TestRPC and TestInProcess functions 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.

gemini-code-assist[bot] avatar Nov 03 '25 06:11 gemini-code-assist[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar Nov 24 '25 17:11 sonarqubecloud[bot]