File tree Expand file tree Collapse file tree 11 files changed +28
-7
lines changed Expand file tree Collapse file tree 11 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ buildvariants:
75
75
display_name : Atlas connect RHEL8
76
76
run_on :
77
77
- rhel87-small
78
+ expansions :
79
+ TEST_NAME : atlas_connect
78
80
tags : [pr]
79
81
80
82
# Atlas data lake tests
Original file line number Diff line number Diff line change @@ -425,6 +425,7 @@ def create_atlas_connect_variants():
425
425
get_variant_name ("Atlas connect" , host ),
426
426
tags = ["pr" ],
427
427
host = DEFAULT_HOST ,
428
+ expansions = dict (TEST_NAME = "atlas_connect" ),
428
429
)
429
430
]
430
431
Original file line number Diff line number Diff line change @@ -417,7 +417,18 @@ def handle_test_env() -> None:
417
417
run_command (f"bash { auth_aws_dir } /setup-secrets.sh" )
418
418
419
419
if test_name == "atlas_connect" :
420
- get_secrets ("drivers/atlas_connect" )
420
+ secrets = get_secrets ("drivers/atlas_connect" )
421
+
422
+ # Write file with Atlas X509 client certificate:
423
+ decoded = base64 .b64decode (secrets ["ATLAS_X509_DEV_CERT_BASE64" ]).decode ("utf8" )
424
+ cert_file = ROOT / ".evergreen/atlas_x509_dev_client_certificate.pem"
425
+ with cert_file .open ("w" ) as file :
426
+ file .write (decoded )
427
+ write_env (
428
+ "ATLAS_X509_DEV_WITH_CERT" ,
429
+ secrets ["ATLAS_X509_DEV" ] + "&tlsCertificateKeyFile=" + str (cert_file ),
430
+ )
431
+
421
432
# We do not want the default client_context to be initialized.
422
433
write_env ("DISABLE_CONTEXT" )
423
434
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ expansion.yml
30
30
.evergreen /scripts /test-env.sh
31
31
specifications /
32
32
results.json
33
+ .evergreen /atlas_x509_dev_client_certificate.pem
33
34
34
35
# Lambda temp files
35
36
test /lambda /.aws-sam
Original file line number Diff line number Diff line change @@ -1411,7 +1411,7 @@ async def test_to_list_length(self):
1411
1411
async def test_to_list_csot_applied (self ):
1412
1412
client = await self .async_single_client (timeoutMS = 500 , w = 1 )
1413
1413
coll = client .pymongo .test
1414
- # Initialize the client with a larger timeout to help make test less flakey
1414
+ # Initialize the client with a larger timeout to help make test less flaky
1415
1415
with pymongo .timeout (10 ):
1416
1416
await coll .insert_many ([{} for _ in range (5 )])
1417
1417
cursor = coll .find ({"$where" : delay (1 )})
@@ -1453,7 +1453,7 @@ async def test_command_cursor_to_list_length(self):
1453
1453
async def test_command_cursor_to_list_csot_applied (self ):
1454
1454
client = await self .async_single_client (timeoutMS = 500 , w = 1 )
1455
1455
coll = client .pymongo .test
1456
- # Initialize the client with a larger timeout to help make test less flakey
1456
+ # Initialize the client with a larger timeout to help make test less flaky
1457
1457
with pymongo .timeout (10 ):
1458
1458
await coll .insert_many ([{} for _ in range (5 )])
1459
1459
fail_command = {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class TestPoolPausedError(AsyncIntegrationTest):
87
87
async def test_pool_paused_error_is_retryable (self ):
88
88
if "PyPy" in sys .version :
89
89
# Tracked in PYTHON-3519
90
- self .skipTest ("Test is flakey on PyPy" )
90
+ self .skipTest ("Test is flaky on PyPy" )
91
91
cmap_listener = CMAPListener ()
92
92
cmd_listener = OvertCommandListener ()
93
93
client = await self .async_rs_or_single_client (
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ def empty_seedlist():
262
262
263
263
await self ._test_recover_from_initial (empty_seedlist )
264
264
265
+ @flaky (reason = "PYTHON-5315" )
265
266
async def test_recover_from_initially_erroring_seedlist (self ):
266
267
def erroring_seedlist ():
267
268
raise ConfigurationError
Original file line number Diff line number Diff line change 42
42
"ATLAS_SRV_FREE" : os .environ .get ("ATLAS_SRV_FREE" ),
43
43
"ATLAS_SRV_TLS11" : os .environ .get ("ATLAS_SRV_TLS11" ),
44
44
"ATLAS_SRV_TLS12" : os .environ .get ("ATLAS_SRV_TLS12" ),
45
+ "ATLAS_X509_DEV_WITH_CERT" : os .environ .get ("ATLAS_X509_DEV_WITH_CERT" ),
45
46
}
46
47
47
48
@@ -91,6 +92,9 @@ def test_srv_tls_11(self):
91
92
def test_srv_tls_12 (self ):
92
93
self .connect_srv (URIS ["ATLAS_SRV_TLS12" ])
93
94
95
+ def test_x509_with_cert (self ):
96
+ self .connect (URIS ["ATLAS_X509_DEV_WITH_CERT" ])
97
+
94
98
def test_uniqueness (self ):
95
99
"""Ensure that we don't accidentally duplicate the test URIs."""
96
100
uri_to_names = defaultdict (list )
Original file line number Diff line number Diff line change @@ -1402,7 +1402,7 @@ def test_to_list_length(self):
1402
1402
def test_to_list_csot_applied (self ):
1403
1403
client = self .single_client (timeoutMS = 500 , w = 1 )
1404
1404
coll = client .pymongo .test
1405
- # Initialize the client with a larger timeout to help make test less flakey
1405
+ # Initialize the client with a larger timeout to help make test less flaky
1406
1406
with pymongo .timeout (10 ):
1407
1407
coll .insert_many ([{} for _ in range (5 )])
1408
1408
cursor = coll .find ({"$where" : delay (1 )})
@@ -1444,7 +1444,7 @@ def test_command_cursor_to_list_length(self):
1444
1444
def test_command_cursor_to_list_csot_applied (self ):
1445
1445
client = self .single_client (timeoutMS = 500 , w = 1 )
1446
1446
coll = client .pymongo .test
1447
- # Initialize the client with a larger timeout to help make test less flakey
1447
+ # Initialize the client with a larger timeout to help make test less flaky
1448
1448
with pymongo .timeout (10 ):
1449
1449
coll .insert_many ([{} for _ in range (5 )])
1450
1450
fail_command = {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ class TestPoolPausedError(IntegrationTest):
87
87
def test_pool_paused_error_is_retryable (self ):
88
88
if "PyPy" in sys .version :
89
89
# Tracked in PYTHON-3519
90
- self .skipTest ("Test is flakey on PyPy" )
90
+ self .skipTest ("Test is flaky on PyPy" )
91
91
cmap_listener = CMAPListener ()
92
92
cmd_listener = OvertCommandListener ()
93
93
client = self .rs_or_single_client (
You can’t perform that action at this time.
0 commit comments