Skip to content

Commit 3faccfc

Browse files
committed
DRIVERS-2915 Add ENVIRONMENT auth mechanism property to test URIs
1 parent eaae22c commit 3faccfc

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

test/connection_string/test/valid-options.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"description": "Colon in a key value pair",
43-
"uri": "mongodb://example.com/?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://test-cluster",
43+
"uri": "mongodb://example.com/?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://test-cluster,ENVIRONMENT:azure",
4444
"valid": true,
4545
"warning": false,
4646
"hosts": [
@@ -53,9 +53,10 @@
5353
"auth": null,
5454
"options": {
5555
"authmechanismProperties": {
56-
"TOKEN_RESOURCE": "mongodb://test-cluster"
56+
"TOKEN_RESOURCE": "mongodb://test-cluster",
57+
"ENVIRONMENT": "azure"
5758
}
5859
}
5960
}
6061
]
61-
}
62+
}

test/connection_string/test/valid-warnings.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
},
9797
{
9898
"description": "Comma in a key value pair causes a warning",
99-
"uri": "mongodb://localhost?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://host1%2Chost2",
99+
"uri": "mongodb://localhost?authMechanism=MONGODB-OIDC&authMechanismProperties=TOKEN_RESOURCE:mongodb://host1%2Chost2,ENVIRONMENT:azure",
100100
"valid": true,
101101
"warning": true,
102102
"hosts": [
@@ -108,8 +108,12 @@
108108
],
109109
"auth": null,
110110
"options": {
111-
"authMechanism": "MONGODB-OIDC"
111+
"authMechanism": "MONGODB-OIDC",
112+
"authmechanismProperties": {
113+
"TOKEN_RESOURCE": "mongodb://test-cluster",
114+
"ENVIRONMENT": "azure"
115+
}
112116
}
113117
}
114118
]
115-
}
119+
}

0 commit comments

Comments
 (0)