From 3faccfc613a821248d90e528a783a7033ef702ae Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 26 Feb 2025 07:26:51 -0600 Subject: [PATCH 1/2] DRIVERS-2915 Add ENVIRONMENT auth mechanism property to test URIs --- test/connection_string/test/valid-options.json | 7 ++++--- test/connection_string/test/valid-warnings.json | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/test/connection_string/test/valid-options.json b/test/connection_string/test/valid-options.json index 6c86172d08..e094bcf606 100644 --- a/test/connection_string/test/valid-options.json +++ b/test/connection_string/test/valid-options.json @@ -40,7 +40,7 @@ }, { "description": "Colon in a key value pair", - "uri": "mongodb://example.com/?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://test-cluster", + "uri": "mongodb://example.com/?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://test-cluster,ENVIRONMENT:azure", "valid": true, "warning": false, "hosts": [ @@ -53,9 +53,10 @@ "auth": null, "options": { "authmechanismProperties": { - "TOKEN_RESOURCE": "mongodb://test-cluster" + "TOKEN_RESOURCE": "mongodb://test-cluster", + "ENVIRONMENT": "azure" } } } ] -} +} \ No newline at end of file diff --git a/test/connection_string/test/valid-warnings.json b/test/connection_string/test/valid-warnings.json index daf814a75f..851618ce34 100644 --- a/test/connection_string/test/valid-warnings.json +++ b/test/connection_string/test/valid-warnings.json @@ -96,7 +96,7 @@ }, { "description": "Comma in a key value pair causes a warning", - "uri": "mongodb://localhost?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://host1%2Chost2", + "uri": "mongodb://localhost?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://host1%2Chost2,ENVIRONMENT:azure", "valid": true, "warning": true, "hosts": [ @@ -108,8 +108,12 @@ ], "auth": null, "options": { - "authMechanism": "MONGODB-OIDC" + "authMechanism": "MONGODB-OIDC", + "authmechanismProperties": { + "TOKEN_RESOURCE": "mongodb://test-cluster", + "ENVIRONMENT": "azure" + } } } ] -} +} \ No newline at end of file From 1fa1cc94d31131d731b355456a7bc24710a1c812 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 26 Feb 2025 09:46:04 -0600 Subject: [PATCH 2/2] update test --- test/connection_string/test/valid-warnings.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/connection_string/test/valid-warnings.json b/test/connection_string/test/valid-warnings.json index 851618ce34..c46a8311c5 100644 --- a/test/connection_string/test/valid-warnings.json +++ b/test/connection_string/test/valid-warnings.json @@ -108,11 +108,7 @@ ], "auth": null, "options": { - "authMechanism": "MONGODB-OIDC", - "authmechanismProperties": { - "TOKEN_RESOURCE": "mongodb://test-cluster", - "ENVIRONMENT": "azure" - } + "authMechanism": "MONGODB-OIDC" } } ]