Skip to content

Commit e40b18e

Browse files
author
Thomas Reggi
authored
test: adds SPEC-1511 to lift restriction on authSource option
NODE-2433
1 parent c394284 commit e40b18e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/spec/auth/connection-string.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@
351351
"valid": true,
352352
"credential": null
353353
},
354+
{
355+
"description": "authSource without username doesn't create credential",
356+
"uri": "mongodb://localhost/?authSource=foo",
357+
"valid": true,
358+
"credential": null
359+
},
354360
{
355361
"description": "should throw an exception if no username provided (userinfo implies default mechanism)",
356362
"uri": "mongodb://@localhost.com/",
@@ -362,4 +368,4 @@
362368
"valid": false
363369
}
364370
]
365-
}
371+
}

test/spec/auth/connection-string.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ tests:
287287
uri: "mongodb://localhost/foo"
288288
valid: true
289289
credential: ~
290+
-
291+
description: "authSource without username doesn't create credential"
292+
uri: "mongodb://localhost/?authSource=foo"
293+
valid: true
294+
credential: ~
290295
-
291296
description: "should throw an exception if no username provided (userinfo implies default mechanism)"
292297
uri: "mongodb://@localhost.com/"

0 commit comments

Comments
 (0)