• Type: Epic
    • Resolution: Done
    • Priority: Unknown
    • 2.10.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • testcontainer-based Testing for CSE
    • Go Drivers
    • Not Needed
    • Done
    • 7
    • 4.5
    • 4.5
    • 100
    • -35
    • 🔵 Done
    • Hide

      Engineer(s): Ayesha Islam, Preston Vasquez

      What was accomplished since the last update?
      Completed the project

      Show
      Engineer(s): Ayesha Islam, Preston Vasquez What was accomplished since the last update? Completed the project
    • Hide

      2026-10-10 - 🔵 Done
      Engineer(s): Ayesha Islam, Preston Vasquez

      What was accomplished since the last update?
      Completed the project


      2026-09-25 - No confidence status provided
      Engineer(s): Ayesha Islam, Preston Vasquez

      What was accomplished since the last update?
      Dockerized AWS SSO login to export CSFLE test secrets, we have a concrete PR in review.

      What's the focus over the next two weeks?
      The focus is to get to a point where we can run a canary test for a CSFLE candidate using zero-effort testcontainers.

      Any risks/blockers/impediments?
      The next step is to containerize libmongocrypt itself (or simplify existing setups).


      Show
      2026-10-10 - 🔵 Done Engineer(s): Ayesha Islam, Preston Vasquez What was accomplished since the last update? Completed the project 2026-09-25 - No confidence status provided Engineer(s): Ayesha Islam, Preston Vasquez What was accomplished since the last update? Dockerized AWS SSO login to export CSFLE test secrets, we have a concrete PR in review. What's the focus over the next two weeks? The focus is to get to a point where we can run a canary test for a CSFLE candidate using zero-effort testcontainers. Any risks/blockers/impediments? The next step is to containerize libmongocrypt itself (or simplify existing setups).
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      Establish proof-of-concept for testcontainer-based testing prose tests using the CSE (client-side encryption) prose tests as the first implementation; wrapping drivers-evergreen-tools orchestration in testcontainers. CSE prose tests are hard to run locally today because they require manual setup of libmongocrypt, mongocryptd, crypt_shared, and mock KMS servers. This design enables zero-effort local reproduction with CI parity, plus isolated/parallel execution and cleaner test dependency management without polluting consumer dependency trees.

      If we are able to run these test in CI and locally using testcontainers, then we can continue with a broader effort to containerize all prose tests. See GODRIVER-3721 for context.

      Here is a rough shape of the work to be done:

      // internal/test/container package
      
      func ExportSecrets(t testing.T) map[string]string { / ticket 1 */ }
      
      func StartCSEContainer(t *testing.T) CSEContainer { / ticket 2 */ }
      
      type CSEContainer struct{ /* ... */ }
      
      var global *CSEContainer
      
      func Global(t *testing.T) *CSEContainer { return global } // ticket 4
      
      func GoTest(t testing.T, testName string) { / ticket 5 */ }
      
      // internal/test/prose/main_test.go
      
      func TestMain(m *testing.M) {
          if !credentialsFreshOrCI() {
              container.ExportSecrets(t) // ticket 4
          }
          global = container.StartCSEContainer(t,
              container.WithMongoDBURI(hostMongoURI),
              container.WithKMS(t),
          )
          code := m.Run()
          global.Terminate()
          os.Exit(code)
      }
      
      // internal/test/prose/csfle_test.go
      
      func TestClientSideEncryptionProse_27(t *testing.T) {
          container.GoTest(t, "TestClientSideEncryptionProse_27")
      }
      
      // ticket 7: repeat for remaining CSE prose tests
      func TestClientSideEncryptionProse_XX(t *testing.T) {
          container.GoTest(t, "TestClientSideEncryptionProse_XX")
      }
      

      Motivation

      Who is the affected end user?

      Go Driver engineering team, specifically engineers running or debugging CSE prose tests locally

      How does this affect the end user?

      CSE prose tests currently require manual AWS SSO login and libmongocrypt setup, blocking quick local reproduction. Shared orchestration also creates bottlenecks in test execution time, and test-only dependencies (like testify) in the main module trigger confusing CVE reports for consumers who never use them.

      How likely is it that this problem or use case will occur?

      Main path for anyone working on or debugging CSE

      If the problem does occur, what are the consequences and how severe are they?

      Performance concern: slow test feedback loops impact developer productivity. Dependency concern: CVE noise confuses consumers.

      Is this issue urgent?

      Not urgent, but foundational for future test infrastructure improvements.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Test improvements only no functional impact on driver behavior.

            Assignee:
            Ayesha Islam
            Reporter:
            Preston Vasquez
            Preston Vasquez Preston Vasquez
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 weeks, 2 days
              None