Skip to content

Commit 5e62d1d

Browse files
committed
PYTHON-2603 Standardize on ubuntu1804 zseries, power8, and arm64 (#600)
PYTHON-2647 Fix test_use_openssl_when_available when service_identity<18.1 is installed (cherry picked from commit 9304643)
1 parent a01fec5 commit 5e62d1d

File tree

2 files changed

+17
-48
lines changed

2 files changed

+17
-48
lines changed

.evergreen/config.yml

Lines changed: 13 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,16 +1626,6 @@ axes:
16261626
batchtime: 10080 # 7 days
16271627
variables:
16281628
libmongocrypt_url: https://s3.amazonaws.com/mciuploads/libmongocrypt/rhel-70-64-bit/master/latest/libmongocrypt.tar.gz
1629-
- id: rhel71-power8-test
1630-
display_name: "RHEL 7.1 (POWER8)"
1631-
run_on: rhel71-power8-test
1632-
batchtime: 10080 # 7 days
1633-
- id: rhel72-zseries-test
1634-
display_name: "RHEL 7.2 (zSeries)"
1635-
run_on: rhel72-zseries-test
1636-
batchtime: 10080 # 7 days
1637-
variables:
1638-
libmongocrypt_url: https://s3.amazonaws.com/mciuploads/libmongocrypt/rhel72-zseries-test/master/latest/libmongocrypt.tar.gz
16391629
- id: suse12-x86-64-test
16401630
display_name: "SUSE 12 (x86_64)"
16411631
run_on: suse12-sp5-small
@@ -1661,19 +1651,17 @@ axes:
16611651
batchtime: 10080 # 7 days
16621652
variables:
16631653
python3_binary: python3
1664-
- id: ubuntu1604-arm64-small
1665-
display_name: "Ubuntu 16.04 (ARM64)"
1666-
run_on: ubuntu1604-arm64-small
1654+
- id: ubuntu1804-zseries
1655+
display_name: "Ubuntu 18.04 (zSeries)"
1656+
run_on: ubuntu1804-zseries-small
16671657
batchtime: 10080 # 7 days
1668-
variables:
1669-
libmongocrypt_url: https://s3.amazonaws.com/mciuploads/libmongocrypt/ubuntu1604-arm64/master/latest/libmongocrypt.tar.gz
1670-
- id: ubuntu1604-power8-test
1671-
display_name: "Ubuntu 16.04 (POWER8)"
1672-
run_on: ubuntu1604-power8-test
1658+
- id: ubuntu1804-power8
1659+
display_name: "Ubuntu 18.04 (POWER8)"
1660+
run_on: ubuntu1804-power8-small
16731661
batchtime: 10080 # 7 days
1674-
- id: ubuntu1804-arm64-test
1662+
- id: ubuntu1804-arm64
16751663
display_name: "Ubuntu 18.04 (ARM64)"
1676-
run_on: ubuntu1804-arm64-test
1664+
run_on: ubuntu1804-arm64-small
16771665
batchtime: 10080 # 7 days
16781666
variables:
16791667
libmongocrypt_url: https://s3.amazonaws.com/mciuploads/libmongocrypt/ubuntu1804-arm64/master/latest/libmongocrypt.tar.gz
@@ -2103,7 +2091,6 @@ buildvariants:
21032091
# OSes that support versions of MongoDB>=3.2 with SSL.
21042092
- ubuntu-16.04
21052093
- suse12-x86-64-test
2106-
- rhel71-power8-test
21072094
auth-ssl: "*"
21082095
display_name: "${platform} ${auth-ssl}"
21092096
tasks:
@@ -2162,40 +2149,23 @@ buildvariants:
21622149
platform:
21632150
# OSes that support versions of MongoDB>=3.4 <4.2 with SSL.
21642151
- debian81
2165-
- ubuntu1604-power8-test
2166-
- ubuntu1604-arm64-small
2167-
auth-ssl: "*"
2168-
display_name: "${platform} ${auth-ssl}"
2169-
tasks:
2170-
- ".4.0"
2171-
- ".3.6"
2172-
- ".3.4"
2173-
2174-
- matrix_name: "test-os-requires-34"
2175-
matrix_spec:
2176-
platform:
2177-
# OSes that support versions of MongoDB>=3.4 with SSL.
2178-
- rhel72-zseries-test
21792152
auth-ssl: "*"
21802153
display_name: "${platform} ${auth-ssl}"
21812154
tasks:
2182-
- ".latest"
2183-
- ".4.4"
2184-
- ".4.2"
21852155
- ".4.0"
21862156
- ".3.6"
21872157
- ".3.4"
21882158

2189-
- matrix_name: "test-os-requires-42"
2159+
# Test one server version (4.2) with zSeries, POWER8, and ARM.
2160+
- matrix_name: "test-different-cpu-architectures"
21902161
matrix_spec:
21912162
platform:
2192-
# OSes that support versions of MongoDB>=4.2 with SSL.
2193-
- ubuntu1804-arm64-test
2163+
- ubuntu1804-zseries # Ubuntu 18 or RHEL 8.x?
2164+
- ubuntu1804-power8 # Ubuntu 18 or RHEL 7?
2165+
- ubuntu1804-arm64
21942166
auth-ssl: "*"
21952167
display_name: "${platform} ${auth-ssl}"
21962168
tasks:
2197-
- ".latest"
2198-
- ".4.4"
21992169
- ".4.2"
22002170

22012171
- matrix_name: "tests-python-version-amazon1-test-ssl"

test/test_ssl.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@
5151
import OpenSSL
5252
import requests
5353
import service_identity
54+
# Ensure service_identity>=18.1 is installed
55+
from service_identity.pyopenssl import verify_ip_address
56+
from pymongo.ocsp_support import _load_trusted_ca_certs
5457
_HAVE_PYOPENSSL = True
5558
except ImportError:
5659
pass
5760

58-
if _HAVE_PYOPENSSL:
59-
from pymongo.ocsp_support import _load_trusted_ca_certs
60-
else:
61-
_load_trusted_ca_certs = None
6261

6362
if HAVE_SSL:
6463
import ssl
@@ -164,7 +163,7 @@ def test_config_ssl(self):
164163
ssl.CERT_REQUIRED)
165164

166165
@unittest.skipUnless(_HAVE_PYOPENSSL, "PyOpenSSL is not available.")
167-
def test_use_openssl_when_available(self):
166+
def test_use_pyopenssl_when_available(self):
168167
self.assertTrue(_ssl.IS_PYOPENSSL)
169168

170169
@unittest.skipUnless(_HAVE_PYOPENSSL, "Cannot test without PyOpenSSL")

0 commit comments

Comments
 (0)