Skip to content

Commit 61add4a

Browse files
authored
PYTHON-3303 Upgrade encryption testing to macos 10.15+ (#1004)
1 parent 309a7e0 commit 61add4a

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.evergreen/config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,14 @@ axes:
18431843
skip_ECS_auth_test: true
18441844
python3_binary: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
18451845
libmongocrypt_url: https://s3.amazonaws.com/mciuploads/libmongocrypt/macos/master/latest/libmongocrypt.tar.gz
1846+
- id: macos-1100
1847+
display_name: "macOS 11.00"
1848+
run_on: macos-1100
1849+
variables:
1850+
skip_EC2_auth_test: true
1851+
skip_ECS_auth_test: true
1852+
python3_binary: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
1853+
libmongocrypt_url: https://s3.amazonaws.com/mciuploads/libmongocrypt/macos/master/latest/libmongocrypt.tar.gz
18461854
- id: rhel62
18471855
display_name: "RHEL 6.2 (x86_64)"
18481856
run_on: rhel62-small
@@ -2287,7 +2295,7 @@ buildvariants:
22872295
- matrix_name: "test-macos-encryption"
22882296
matrix_spec:
22892297
platform:
2290-
- macos-1014
2298+
- macos-1100
22912299
auth: "auth"
22922300
ssl: "nossl"
22932301
encryption: "*"

test/test_encryption.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,10 +1777,9 @@ def setUp(self):
17771777
self.cipher_text = self.client_encryption.encrypt(
17781778
"hello", key_id=keyID, algorithm=Algorithm.AEAD_AES_256_CBC_HMAC_SHA_512_Deterministic
17791779
)
1780-
if self.cipher_text[-1] == 0:
1781-
self.malformed_cipher_text = self.cipher_text[:-1] + b"1"
1782-
else:
1783-
self.malformed_cipher_text = self.cipher_text[:-1] + b"0"
1780+
self.malformed_cipher_text = self.cipher_text[:-1] + (self.cipher_text[-1] ^ 1).to_bytes(
1781+
1, "big"
1782+
)
17841783
self.malformed_cipher_text = Binary(self.malformed_cipher_text, 6)
17851784
opts = AutoEncryptionOpts(
17861785
key_vault_namespace="keyvault.datakeys", kms_providers=kms_providers_map

0 commit comments

Comments
 (0)