Skip to content

Commit 82be6f2

Browse files
authored
DRIVERS-2938: Remove MONGODB-CR from spec tests (#1611)
1 parent 483105e commit 82be6f2

File tree

6 files changed

+10
-118
lines changed

6 files changed

+10
-118
lines changed

source/auth/tests/legacy/connection-string.json

Lines changed: 0 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/auth/tests/legacy/connection-string.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -116,36 +116,6 @@ tests:
116116
- description: should throw an exception if no username (GSSAPI)
117117
uri: mongodb://localhost/?authMechanism=GSSAPI
118118
valid: false
119-
- description: should recognize the mechanism (MONGODB-CR)
120-
uri: mongodb://user:password@localhost/?authMechanism=MONGODB-CR
121-
valid: true
122-
credential:
123-
username: user
124-
password: password
125-
source: admin
126-
mechanism: MONGODB-CR
127-
mechanism_properties:
128-
- description: should use the database when no authSource is specified (MONGODB-CR)
129-
uri: mongodb://user:password@localhost/foo?authMechanism=MONGODB-CR
130-
valid: true
131-
credential:
132-
username: user
133-
password: password
134-
source: foo
135-
mechanism: MONGODB-CR
136-
mechanism_properties:
137-
- description: should use the authSource when specified (MONGODB-CR)
138-
uri: mongodb://user:password@localhost/foo?authMechanism=MONGODB-CR&authSource=bar
139-
valid: true
140-
credential:
141-
username: user
142-
password: password
143-
source: bar
144-
mechanism: MONGODB-CR
145-
mechanism_properties:
146-
- description: should throw an exception if no username is supplied (MONGODB-CR)
147-
uri: mongodb://localhost/?authMechanism=MONGODB-CR
148-
valid: false
149119
- description: should recognize the mechanism (MONGODB-X509)
150120
uri: mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509
151121
valid: true

source/connection-string/tests/valid-auth.json

Lines changed: 3 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/connection-string/tests/valid-auth.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -173,24 +173,8 @@ tests:
173173
db: "my=db"
174174
options: ~
175175
-
176-
description: "Escaped user info and database (MONGODB-CR)"
177-
uri: "mongodb://%24am:f%3Azzb%40z%2Fz%[email protected]/admin%3F?authMechanism=MONGODB-CR"
178-
valid: true
179-
warning: false
180-
hosts:
181-
-
182-
type: "ipv4"
183-
host: "127.0.0.1"
184-
port: ~
185-
auth:
186-
username: "$am"
187-
password: "f:zzb@z/z="
188-
db: "admin?"
189-
options:
190-
authmechanism: "MONGODB-CR"
191-
-
192-
description: "Subdelimiters in user/pass don't need escaping (MONGODB-CR)"
193-
uri: "mongodb://!$&'()*+,;=:!$&'()*+,;[email protected]/admin?authMechanism=MONGODB-CR"
176+
description: "Subdelimiters in user/pass don't need escaping (PLAIN)"
177+
uri: "mongodb://!$&'()*+,;=:!$&'()*+,;[email protected]/admin?authMechanism=PLAIN"
194178
valid: true
195179
warning: false
196180
hosts:
@@ -203,7 +187,7 @@ tests:
203187
password: "!$&'()*+,;="
204188
db: "admin"
205189
options:
206-
authmechanism: "MONGODB-CR"
190+
authmechanism: "PLAIN"
207191
-
208192
description: "Escaped username (MONGODB-X509)"
209193
uri: "mongodb://CN%3DmyName%2COU%3DmyOrgUnit%2CO%3DmyOrg%2CL%3DmyLocality%2CST%3DmyState%2CC%3DmyCountry@localhost/?authMechanism=MONGODB-X509"

source/connection-string/tests/valid-options.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/connection-string/tests/valid-options.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests:
22
-
33
description: "Option names are normalized to lowercase"
4-
uri: "mongodb://alice:[email protected]/admin?AUTHMechanism=MONGODB-CR"
4+
uri: "mongodb://alice:[email protected]/admin?AUTHMechanism=PLAIN"
55
valid: true
66
warning: false
77
hosts:
@@ -14,7 +14,7 @@ tests:
1414
password: "secret"
1515
db: "admin"
1616
options:
17-
authmechanism: "MONGODB-CR"
17+
authmechanism: "PLAIN"
1818
-
1919
description: "Missing delimiting slash between hosts and options"
2020
uri: "mongodb://example.com?tls=true"

0 commit comments

Comments
 (0)