Skip to content

Commit f56ad8e

Browse files
benjirewisBenjamin Rewis
authored andcommitted
GODRIVER-2114 Fix failing KMS TLS tests (#712)
1 parent 2acd3e8 commit f56ad8e

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
@@ -810,20 +810,18 @@ functions:
810810
811811
start-kms-mock-server:
812812
- command: shell.exec
813-
type: test
814813
params:
815-
working_dir: src
816-
background: true
817814
script: |
818815
${PREPARE_SHELL}
816+
819817
cd ${DRIVERS_TOOLS}/.evergreen/csfle
820-
cat <<EOF > kms_setup.json
821-
{
822-
"kms_ca_file": "${KMS_CA_FILE}",
823-
"kms_cert_file": "${KMS_CERT_FILE}"
824-
}
825-
EOF
826-
mongo --nodb mock_kms.js
818+
. ./activate_venv.sh
819+
- command: shell.exec
820+
params:
821+
background: true
822+
script: |
823+
cd ${DRIVERS_TOOLS}/.evergreen/csfle
824+
./kmstlsvenv/bin/python3 -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/${CERT_FILE} --port 8000
827825
828826
run-kms-tls-test:
829827
- command: shell.exec
@@ -1702,8 +1700,7 @@ tasks:
17021700
SSL: "nossl"
17031701
- func: start-kms-mock-server
17041702
vars:
1705-
KMS_CA_FILE: "ca.pem"
1706-
KMS_CERT_FILE: "expired.pem"
1703+
CERT_FILE: "expired.pem"
17071704
- func: run-kms-tls-test
17081705
vars:
17091706
KMS_TLS_TESTCASE: "INVALID_CERT"
@@ -1721,8 +1718,7 @@ tasks:
17211718
SSL: "nossl"
17221719
- func: start-kms-mock-server
17231720
vars:
1724-
KMS_CA_FILE: "ca.pem"
1725-
KMS_CERT_FILE: "wrong-host.pem"
1721+
CERT_FILE: "wrong-host.pem"
17261722
- func: run-kms-tls-test
17271723
vars:
17281724
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)