Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Nov 26, 2024
1 parent 69791a1 commit b476324
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -575,15 +575,15 @@ functions:
binary: "bash"
env:
GO_BUILD_TAGS: cse
CSFLE_TLS_CA_FILE: "${PARENT_DIR}/x509gen/ca.pem"
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY, MONGO_GO_DRIVER_COMPRESSOR]
args: [*task-runner, setup-test]
- command: subprocess.exec
type: test
params:
binary: "bash"
env:
KMS_FAILPOINT_SERVERS_RUNNING: "true"
KMS_FAILPOINT_SERVER_RUNNING: "true"
KMS_FAILPOINT_CA_FILE: "${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem"
args: [*task-runner, evg-test-retry-kms-requests]

run-fuzz-tests:
Expand Down
13 changes: 8 additions & 5 deletions internal/integration/client_side_encryption_prose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2983,18 +2983,21 @@ func TestClientSideEncryptionProse(t *testing.T) {
})

mt.RunOpts("24. kms retry tests", noClientOpts, func(mt *mtest.T) {
kmsTlsTestcase := os.Getenv("KMS_FAILPOINT_SERVERS_RUNNING")
kmsTlsTestcase := os.Getenv("KMS_FAILPOINT_SERVER_RUNNING")
if kmsTlsTestcase == "" {
mt.Skipf("Skipping test as KMS_FAILPOINT_SERVERS_RUNNING is not set")
mt.Skipf("Skipping test as KMS_FAILPOINT_SERVER_RUNNING is not set")
}

mt.Parallel()

var tlsCfg *tls.Config
if tlsCAFileKMIP != "" {
if tlsCAFile := os.Getenv("KMS_FAILPOINT_CA_FILE"); tlsCAFile == "" {
require.Fail(mt, "failed to load CA file")
} else {
mt.Logf("load CA file from %s", tlsCAFile)
var err error
clientAndCATlsMap := map[string]interface{}{
"tlsCAFile": tlsCAFileKMIP,
"tlsCAFile": tlsCAFile,
}
tlsCfg, err = options.BuildTLSConfig(clientAndCATlsMap)
require.Nil(mt, err, "BuildTLSConfig error: %v", err)
Expand Down Expand Up @@ -3064,7 +3067,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
require.NoError(mt, err, "error on NewClientEncryption: %v", err)

err = setFailPoint(tc.failure, 1)
require.NoError(mt, err, "mock server error: %v, %s", err, tlsCAFileKMIP)
require.NoError(mt, err, "mock server error: %v", err)

dkOpts := options.DataKey().SetMasterKey(dataKey.masterKey)
var keyID bson.Binary
Expand Down

0 comments on commit b476324

Please sign in to comment.