File tree Expand file tree Collapse file tree 5 files changed +20
-1
lines changed Expand file tree Collapse file tree 5 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ buildvariants:
7575 display_name : Atlas connect RHEL8
7676 run_on :
7777 - rhel87-small
78+ expansions :
79+ TEST_NAME : atlas_connect
7880 tags : [pr]
7981
8082 # Atlas data lake tests
Original file line number Diff line number Diff line change @@ -425,6 +425,7 @@ def create_atlas_connect_variants():
425425 get_variant_name ("Atlas connect" , host ),
426426 tags = ["pr" ],
427427 host = DEFAULT_HOST ,
428+ expansions = dict (TEST_NAME = "atlas_connect" ),
428429 )
429430 ]
430431
Original file line number Diff line number Diff line change @@ -417,7 +417,18 @@ def handle_test_env() -> None:
417417 run_command (f"bash { auth_aws_dir } /setup-secrets.sh" )
418418
419419 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+
421432 # We do not want the default client_context to be initialized.
422433 write_env ("DISABLE_CONTEXT" )
423434
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ expansion.yml
3030.evergreen /scripts /test-env.sh
3131specifications /
3232results.json
33+ .evergreen /atlas_x509_dev_client_certificate.pem
3334
3435# Lambda temp files
3536test /lambda /.aws-sam
Original file line number Diff line number Diff line change 4242 "ATLAS_SRV_FREE" : os .environ .get ("ATLAS_SRV_FREE" ),
4343 "ATLAS_SRV_TLS11" : os .environ .get ("ATLAS_SRV_TLS11" ),
4444 "ATLAS_SRV_TLS12" : os .environ .get ("ATLAS_SRV_TLS12" ),
45+ "ATLAS_X509_DEV_WITH_CERT" : os .environ .get ("ATLAS_X509_DEV_WITH_CERT" ),
4546}
4647
4748
@@ -91,6 +92,9 @@ def test_srv_tls_11(self):
9192 def test_srv_tls_12 (self ):
9293 self .connect_srv (URIS ["ATLAS_SRV_TLS12" ])
9394
95+ def test_x509_with_cert (self ):
96+ self .connect (URIS ["ATLAS_X509_DEV_WITH_CERT" ])
97+
9498 def test_uniqueness (self ):
9599 """Ensure that we don't accidentally duplicate the test URIs."""
96100 uri_to_names = defaultdict (list )
You can’t perform that action at this time.
0 commit comments