tests:
-
description: "no options"
uri: "mongodb://localhost"
valid: true
warning: false
hosts: ~
auth: ~
options: {}
-
description: "no options with trailing question mark"
uri: "mongodb://localhost/?"
valid: true
warning: false
hosts: ~
auth: ~
options: {}
-
description: "no options with trailing question mark and ampersand"
uri: "mongodb://localhost/?&"
valid: true
warning: false
hosts: ~
auth: ~
options: {}
-
description: "single option"
uri: "mongodb://localhost/?w=1"
valid: true
warning: false
hosts: ~
auth: ~
options:
w: 1
-
description: "multiple options"
uri: "mongodb://localhost/?w=1&replicaSet=set"
valid: true
warning: false
hosts: ~
auth: ~
options:
w: 1
replicaset: "set"
-
description: "multiple options with mixed case"
uri: "mongodb://localhost/?ReAdPrEfErEnCe=Primary&wTimeoutMS=1000"
valid: true
warning: false
hosts: ~
auth: ~
options:
readpreference: "Primary"
wtimeoutms: 1000
-
description: "percent encoded option"
uri: "mongodb://localhost/?%77=%74rue"
valid: true
warning: false
hosts: ~
auth: ~
options:
w: "true"
-
description: "options with empty option value"
uri: "mongodb://localhost/?w="
valid: true
warning: false
hosts: ~
auth: ~
options:
w: ""
-
description: "no equals sign in option"
uri: "mongodb://localhost/?w"
valid: false,
warning: false,
hosts: ~
auth: ~
options: {}
-
description: "extra equals signs at start of option value"
uri: "mongodb://localhost/?w==true"
valid: false
warning: false
hosts: ~
auth: ~
options: {}
-
description: "extra equals signs at end of option value"
uri: "mongodb://localhost/?w=true="
valid: false
warning: false
hosts: ~
auth: ~
options: {}
-
description: "equals signs at beginning and end of option value"
uri: "mongodb://localhost/?w==true="
valid: false
warning: false
hosts: ~
auth: ~
options: {}
-
description: "option value of equals sign"
uri: "mongodb://localhost/?w=="
valid: false
warning: false
hosts: ~
auth: ~
options: {}
-
description: "warning for unknown1 option"
uri: "mongodb://localhost/?unknown1=a&w=1&unknown2=b"
valid: true
warning: true
hosts: ~
auth: ~
options:
w: 1
-
description: "options with warnings"
uri: "mongodb://localhost/?w=1&w=2&replicaSet=set"
valid: true
warning: true
hosts: ~
auth: ~
options:
w: 1
replicaset: "set"
-
description: "no warning for duplicate option of list type"
uri: "mongodb://localhost/?readPreferenceTags=a:b&readPreferenceTags=c:d"
valid: true
warning: false
hosts: ~
auth: ~
options:
readpreferencetags:
-
a: "b"
-
c: "d"