Skip to content

Commit 8493e0d

Browse files
committed
fix tests
1 parent 69791a1 commit 8493e0d

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,15 +575,14 @@ functions:
575575
binary: "bash"
576576
env:
577577
GO_BUILD_TAGS: cse
578-
CSFLE_TLS_CA_FILE: "${PARENT_DIR}/x509gen/ca.pem"
579578
include_expansions_in_env: [AUTH, SSL, MONGODB_URI, TOPOLOGY, MONGO_GO_DRIVER_COMPRESSOR]
580579
args: [*task-runner, setup-test]
581580
- command: subprocess.exec
582581
type: test
583582
params:
584583
binary: "bash"
585584
env:
586-
KMS_FAILPOINT_SERVERS_RUNNING: "true"
585+
KMS_FAILPOINT_SERVER_RUNNING: "true"
587586
args: [*task-runner, evg-test-retry-kms-requests]
588587

589588
run-fuzz-tests:

etc/setup-encryption.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
1212
PARENT_DIR=$(dirname $SCRIPT_DIR)
1313

1414
# Handle the secrets
15+
export KMS_FAILPOINT_CA_FILE="${PARENT_DIR}/x509gen/ca.pem"
1516
export CSFLE_TLS_CA_FILE="${PARENT_DIR}/testdata/kmip-certs/ca-ec.pem"
1617
export CSFLE_TLS_CERT_FILE="${PARENT_DIR}/testdata/kmip-certs/server-ec.pem"
1718
export CSFLE_TLS_CLIENT_CERT_FILE="${PARENT_DIR}/testdata/kmip-certs/client-ec.pem"

internal/integration/client_side_encryption_prose_test.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,18 +2983,21 @@ func TestClientSideEncryptionProse(t *testing.T) {
29832983
})
29842984

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

29912991
mt.Parallel()
29922992

29932993
var tlsCfg *tls.Config
2994-
if tlsCAFileKMIP != "" {
2994+
if tlsCAFile := os.Getenv("KMS_FAILPOINT_CA_FILE"); tlsCAFile == "" {
2995+
require.Fail(mt, "failed to load CA file")
2996+
} else {
2997+
mt.Logf("load CA file from %s", tlsCAFile)
29952998
var err error
29962999
clientAndCATlsMap := map[string]interface{}{
2997-
"tlsCAFile": tlsCAFileKMIP,
3000+
"tlsCAFile": tlsCAFile,
29983001
}
29993002
tlsCfg, err = options.BuildTLSConfig(clientAndCATlsMap)
30003003
require.Nil(mt, err, "BuildTLSConfig error: %v", err)
@@ -3064,7 +3067,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
30643067
require.NoError(mt, err, "error on NewClientEncryption: %v", err)
30653068

30663069
err = setFailPoint(tc.failure, 1)
3067-
require.NoError(mt, err, "mock server error: %v, %s", err, tlsCAFileKMIP)
3070+
require.NoError(mt, err, "mock server error: %v", err)
30683071

30693072
dkOpts := options.DataKey().SetMasterKey(dataKey.masterKey)
30703073
var keyID bson.Binary

0 commit comments

Comments
 (0)