Skip to content

Commit 82d3467

Browse files
benjirewisBenjamin Rewis
authored andcommitted
GODRIVER-2114 Fix failing KMS TLS tests (#712)
1 parent af501f5 commit 82d3467

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
@@ -812,20 +812,18 @@ functions:
812812
813813
start-kms-mock-server:
814814
- command: shell.exec
815-
type: test
816815
params:
817-
working_dir: src
818-
background: true
819816
script: |
820817
${PREPARE_SHELL}
818+
821819
cd ${DRIVERS_TOOLS}/.evergreen/csfle
822-
cat <<EOF > kms_setup.json
823-
{
824-
"kms_ca_file": "${KMS_CA_FILE}",
825-
"kms_cert_file": "${KMS_CERT_FILE}"
826-
}
827-
EOF
828-
mongo --nodb mock_kms.js
820+
. ./activate_venv.sh
821+
- command: shell.exec
822+
params:
823+
background: true
824+
script: |
825+
cd ${DRIVERS_TOOLS}/.evergreen/csfle
826+
./kmstlsvenv/bin/python3 -u kms_http_server.py -v --ca_file ../x509gen/ca.pem --cert_file ../x509gen/${CERT_FILE} --port 8000
829827
830828
run-kms-tls-test:
831829
- command: shell.exec
@@ -1704,8 +1702,7 @@ tasks:
17041702
SSL: "nossl"
17051703
- func: start-kms-mock-server
17061704
vars:
1707-
KMS_CA_FILE: "ca.pem"
1708-
KMS_CERT_FILE: "expired.pem"
1705+
CERT_FILE: "expired.pem"
17091706
- func: run-kms-tls-test
17101707
vars:
17111708
KMS_TLS_TESTCASE: "INVALID_CERT"
@@ -1723,8 +1720,7 @@ tasks:
17231720
SSL: "nossl"
17241721
- func: start-kms-mock-server
17251722
vars:
1726-
KMS_CA_FILE: "ca.pem"
1727-
KMS_CERT_FILE: "wrong-host.pem"
1723+
CERT_FILE: "wrong-host.pem"
17281724
- func: run-kms-tls-test
17291725
vars:
17301726
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)