Skip to content

Commit 5d3d3fc

Browse files
committed
test(NODE-7426): Add appName to OIDC test failpoints
1 parent 5535a9c commit 5d3d3fc

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

test/spec/auth/unified/mongodb-oidc-no-retry.json

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
{
66
"minServerVersion": "7.0",
77
"auth": true,
8-
"authMechanism": "MONGODB-OIDC"
8+
"authMechanism": "MONGODB-OIDC",
9+
"serverless": "forbid"
910
}
1011
],
1112
"createEntities": [
@@ -24,7 +25,8 @@
2425
"$$placeholder": 1
2526
},
2627
"retryReads": false,
27-
"retryWrites": false
28+
"retryWrites": false,
29+
"appName": "mongodb-oidc-no-retry"
2830
},
2931
"observeEvents": [
3032
"commandStartedEvent",
@@ -146,7 +148,8 @@
146148
"failCommands": [
147149
"find"
148150
],
149-
"errorCode": 391
151+
"errorCode": 391,
152+
"appName": "mongodb-oidc-no-retry"
150153
}
151154
}
152155
}
@@ -211,7 +214,8 @@
211214
"failCommands": [
212215
"insert"
213216
],
214-
"errorCode": 391
217+
"errorCode": 391,
218+
"appName": "mongodb-oidc-no-retry"
215219
}
216220
}
217221
}
@@ -288,7 +292,8 @@
288292
"failCommands": [
289293
"insert"
290294
],
291-
"closeConnection": true
295+
"closeConnection": true,
296+
"appName": "mongodb-oidc-no-retry"
292297
}
293298
}
294299
}
@@ -320,7 +325,8 @@
320325
"failCommands": [
321326
"saslStart"
322327
],
323-
"errorCode": 18
328+
"errorCode": 18,
329+
"appName": "mongodb-oidc-no-retry"
324330
}
325331
}
326332
}
@@ -397,7 +403,8 @@
397403
"failCommands": [
398404
"saslStart"
399405
],
400-
"errorCode": 18
406+
"errorCode": 18,
407+
"appName": "mongodb-oidc-no-retry"
401408
}
402409
}
403410
}

test/spec/auth/unified/mongodb-oidc-no-retry.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ runOnRequirements:
55
- minServerVersion: "7.0"
66
auth: true
77
authMechanism: "MONGODB-OIDC"
8+
serverless: forbid
89
createEntities:
910
- client:
1011
id: &failPointClient failPointClient
@@ -20,6 +21,7 @@ createEntities:
2021
authMechanismProperties: { $$placeholder: 1 }
2122
retryReads: false
2223
retryWrites: false
24+
appName: &appName mongodb-oidc-no-retry
2325
observeEvents:
2426
- commandStartedEvent
2527
- commandSucceededEvent
@@ -86,6 +88,7 @@ tests:
8688
failCommands:
8789
- find
8890
errorCode: 391 # ReauthenticationRequired
91+
appName: *appName
8992
- name: find
9093
object: collection0
9194
arguments:
@@ -120,6 +123,7 @@ tests:
120123
failCommands:
121124
- insert
122125
errorCode: 391 # ReauthenticationRequired
126+
appName: *appName
123127
- name: insertOne
124128
object: collection0
125129
arguments:
@@ -159,6 +163,7 @@ tests:
159163
failCommands:
160164
- insert
161165
closeConnection: true
166+
appName: *appName
162167
- name: insertOne
163168
object: collection0
164169
arguments:
@@ -179,6 +184,7 @@ tests:
179184
failCommands:
180185
- saslStart
181186
errorCode: 18
187+
appName: *appName
182188
- name: insertOne
183189
object: collection0
184190
arguments:
@@ -212,17 +218,18 @@ tests:
212218
client: failPointClient
213219
failPoint:
214220
configureFailPoint: failCommand
215-
mode:
221+
mode:
216222
times: 1
217223
data:
218224
failCommands:
219225
- saslStart
220226
errorCode: 18
227+
appName: *appName
221228
- name: insertOne
222229
object: collection0
223230
arguments:
224231
document:
225232
_id: 1
226233
x: 1
227234
expectError:
228-
errorCode: 18
235+
errorCode: 18

0 commit comments

Comments
 (0)