Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-2938: Remove MONGODB-CR from spec tests #1611

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions source/auth/tests/legacy/connection-string.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 0 additions & 30 deletions source/auth/tests/legacy/connection-string.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,36 +116,6 @@ tests:
- description: should throw an exception if no username (GSSAPI)
uri: mongodb://localhost/?authMechanism=GSSAPI
valid: false
- description: should recognize the mechanism (MONGODB-CR)
uri: mongodb://user:password@localhost/?authMechanism=MONGODB-CR
valid: true
credential:
username: user
password: password
source: admin
mechanism: MONGODB-CR
mechanism_properties:
- description: should use the database when no authSource is specified (MONGODB-CR)
uri: mongodb://user:password@localhost/foo?authMechanism=MONGODB-CR
valid: true
credential:
username: user
password: password
source: foo
mechanism: MONGODB-CR
mechanism_properties:
- description: should use the authSource when specified (MONGODB-CR)
uri: mongodb://user:password@localhost/foo?authMechanism=MONGODB-CR&authSource=bar
valid: true
credential:
username: user
password: password
source: bar
mechanism: MONGODB-CR
mechanism_properties:
- description: should throw an exception if no username is supplied (MONGODB-CR)
uri: mongodb://localhost/?authMechanism=MONGODB-CR
valid: false
- description: should recognize the mechanism (MONGODB-X509)
uri: mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509
valid: true
Expand Down
27 changes: 3 additions & 24 deletions source/connection-string/tests/valid-auth.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 3 additions & 19 deletions source/connection-string/tests/valid-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,24 +173,8 @@ tests:
db: "my=db"
options: ~
-
description: "Escaped user info and database (MONGODB-CR)"
uri: "mongodb://%24am:f%3Azzb%40z%2Fz%3D@127.0.0.1/admin%3F?authMechanism=MONGODB-CR"
valid: true
warning: false
hosts:
-
type: "ipv4"
host: "127.0.0.1"
port: ~
auth:
username: "$am"
password: "f:zzb@z/z="
db: "admin?"
options:
authmechanism: "MONGODB-CR"
-
description: "Subdelimiters in user/pass don't need escaping (MONGODB-CR)"
uri: "mongodb://!$&'()*+,;=:!$&'()*+,;=@127.0.0.1/admin?authMechanism=MONGODB-CR"
description: "Subdelimiters in user/pass don't need escaping (PLAIN)"
uri: "mongodb://!$&'()*+,;=:!$&'()*+,;=@127.0.0.1/admin?authMechanism=PLAIN"
valid: true
warning: false
hosts:
Expand All @@ -203,7 +187,7 @@ tests:
password: "!$&'()*+,;="
db: "admin"
options:
authmechanism: "MONGODB-CR"
authmechanism: "PLAIN"
-
description: "Escaped username (MONGODB-X509)"
uri: "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509"
Expand Down
4 changes: 2 additions & 2 deletions source/connection-string/tests/valid-options.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions source/connection-string/tests/valid-options.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tests:
-
description: "Option names are normalized to lowercase"
uri: "mongodb://alice:secret@example.com/admin?AUTHMechanism=MONGODB-CR"
uri: "mongodb://alice:secret@example.com/admin?AUTHMechanism=PLAIN"
valid: true
warning: false
hosts:
Expand All @@ -14,7 +14,7 @@ tests:
password: "secret"
db: "admin"
options:
authmechanism: "MONGODB-CR"
authmechanism: "PLAIN"
-
description: "Missing delimiting slash between hosts and options"
uri: "mongodb://example.com?tls=true"
Expand Down
Loading