Skip to content

Commit e78e29b

Browse files
authored
GODRIVER-2114 Fix failing KMS TLS tests (#712)
1 parent 57125a0 commit e78e29b

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

.evergreen/config.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -827,20 +827,18 @@ functions:
827827
828828
start-kms-mock-server:
829829
- command: shell.exec
830-
type: test
831830
params:
832-
working_dir: src
833-
background: true
834831
script: |
835832
${PREPARE_SHELL}
833+
836834
cd ${DRIVERS_TOOLS}/.evergreen/csfle
837-
cat <<EOF > kms_setup.json
838-
{
839-
"kms_ca_file": "${KMS_CA_FILE}",
840-
"kms_cert_file": "${KMS_CERT_FILE}"
841-
}
842-
EOF
843-
mongo --nodb mock_kms.js
835+
. ./activate_venv.sh
836+
- command: shell.exec
837+
params:
838+
background: true
839+
script: |
840+
cd ${DRIVERS_TOOLS}/.evergreen/csfle
841+
./kmstlsvenv/bin/python3 -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/${CERT_FILE} --port 8000
844842
845843
run-kms-tls-test:
846844
- command: shell.exec
@@ -1719,8 +1717,7 @@ tasks:
17191717
SSL: "nossl"
17201718
- func: start-kms-mock-server
17211719
vars:
1722-
KMS_CA_FILE: "ca.pem"
1723-
KMS_CERT_FILE: "expired.pem"
1720+
CERT_FILE: "expired.pem"
17241721
- func: run-kms-tls-test
17251722
vars:
17261723
KMS_TLS_TESTCASE: "INVALID_CERT"
@@ -1738,8 +1735,7 @@ tasks:
17381735
SSL: "nossl"
17391736
- func: start-kms-mock-server
17401737
vars:
1741-
KMS_CA_FILE: "ca.pem"
1742-
KMS_CERT_FILE: "wrong-host.pem"
1738+
CERT_FILE: "wrong-host.pem"
17431739
- func: run-kms-tls-test
17441740
vars:
17451741
KMS_TLS_TESTCASE: "INVALID_HOSTNAME"

mongo/integration/client_side_encryption_prose_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ func TestClientSideEncryptionProse(t *testing.T) {
10781078
bson.D{
10791079
{"region", "us-east-1"},
10801080
{"key", "arn:aws:kms:us-east-1:579766882180:key/89fcc2c4-08b0-4bd9-9f25-e30687b580d0"},
1081-
{"endpoint", "mongodb://127.0.0.1:8000"},
1081+
{"endpoint", "127.0.0.1:8000"},
10821082
},
10831083
))
10841084
assert.NotNil(mt, err, "expected CreateDataKey error, got nil")

0 commit comments

Comments
 (0)