Skip to content

Commit cb32700

Browse files
authored
RUST-1544 sync CLAM test updates to skip getNonce tests on 6.2+ servers (#790)
1 parent 9b9b3a5 commit cb32700

File tree

6 files changed

+69
-8
lines changed

6 files changed

+69
-8
lines changed

src/test/spec/json/command-logging-and-monitoring/logging/driver-connection-id.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"commandName": "ping",
6666
"driverConnectionId": {
6767
"$$type": [
68-
"double",
6968
"int",
7069
"long"
7170
]
@@ -80,7 +79,6 @@
8079
"commandName": "ping",
8180
"driverConnectionId": {
8281
"$$type": [
83-
"double",
8482
"int",
8583
"long"
8684
]

src/test/spec/json/command-logging-and-monitoring/logging/driver-connection-id.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ tests:
4040
message: "Command started"
4141
databaseName: *databaseName
4242
commandName: *commandName
43-
driverConnectionId: { $$type: [double, int, long] }
43+
driverConnectionId: { $$type: [int, long] }
4444

4545
- level: debug
4646
component: command
4747
data:
4848
message: "Command succeeded"
4949
commandName: *commandName
50-
driverConnectionId: { $$type: [double, int, long] }
50+
driverConnectionId: { $$type: [int, long] }
5151

5252
- description: "A failed command"
5353
operations:

src/test/spec/json/command-logging-and-monitoring/logging/redacted-commands.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,11 @@
398398
},
399399
{
400400
"description": "getnonce command and server reply are redacted",
401+
"runOnRequirements": [
402+
{
403+
"maxServerVersion": "6.1.99"
404+
}
405+
],
401406
"operations": [
402407
{
403408
"name": "runCommand",
@@ -443,6 +448,11 @@
443448
},
444449
{
445450
"description": "network error in response to getnonce is not redacted",
451+
"runOnRequirements": [
452+
{
453+
"maxServerVersion": "6.1.99"
454+
}
455+
],
446456
"operations": [
447457
{
448458
"name": "failPoint",
@@ -753,6 +763,11 @@
753763
},
754764
{
755765
"description": "copydbgetnonce command and resulting server-generated error are redacted",
766+
"runOnRequirements": [
767+
{
768+
"maxServerVersion": "3.6.99"
769+
}
770+
],
756771
"operations": [
757772
{
758773
"name": "runCommand",
@@ -804,7 +819,7 @@
804819
"description": "network error in response to copydbgetnonce is not redacted",
805820
"runOnRequirements": [
806821
{
807-
"maxServerVersion": "4.0.99"
822+
"maxServerVersion": "3.6.99"
808823
}
809824
],
810825
"operations": [
@@ -875,6 +890,11 @@
875890
},
876891
{
877892
"description": "copydbsaslstart command and resulting server-generated error are redacted",
893+
"runOnRequirements": [
894+
{
895+
"maxServerVersion": "4.0.99"
896+
}
897+
],
878898
"operations": [
879899
{
880900
"name": "runCommand",
@@ -997,6 +1017,11 @@
9971017
},
9981018
{
9991019
"description": "copydb command and resulting server-generated error are redacted",
1020+
"runOnRequirements": [
1021+
{
1022+
"maxServerVersion": "4.0.99"
1023+
}
1024+
],
10001025
"operations": [
10011026
{
10021027
"name": "runCommand",

src/test/spec/json/command-logging-and-monitoring/logging/redacted-commands.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ tests:
241241
failure: { $$exists: true }
242242

243243
- description: "getnonce command and server reply are redacted"
244+
runOnRequirements:
245+
- maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007
244246
operations:
245247
- name: runCommand
246248
object: *database
@@ -268,6 +270,8 @@ tests:
268270
$$matchAsDocument: {}
269271

270272
- description: "network error in response to getnonce is not redacted"
273+
runOnRequirements:
274+
- maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007
271275
operations:
272276
- name: failPoint
273277
object: testRunner
@@ -453,6 +457,8 @@ tests:
453457
failure: { $$exists: true }
454458

455459
- description: "copydbgetnonce command and resulting server-generated error are redacted"
460+
runOnRequirements:
461+
- maxServerVersion: 3.6.99 # copydbgetnonce was removed as of 4.0 via SERVER-32276
456462
operations:
457463
- name: runCommand
458464
object: *database
@@ -483,7 +489,7 @@ tests:
483489

484490
- description: "network error in response to copydbgetnonce is not redacted"
485491
runOnRequirements:
486-
- maxServerVersion: "4.0.99" # this commmand was removed in MongoDB 4.2 and the server returns CommandNotFound before hitting the failpoint
492+
- maxServerVersion: 3.6.99 # copydbgetnonce was removed as of 4.0 via SERVER-32276
487493
operations:
488494
- name: failPoint
489495
object: testRunner
@@ -523,6 +529,8 @@ tests:
523529
failure: { $$exists: true }
524530

525531
- description: "copydbsaslstart command and resulting server-generated error are redacted"
532+
runOnRequirements:
533+
- maxServerVersion: 4.0.99 # copydbsaslstart was removed as of 4.2 via SERVER-36211
526534
operations:
527535
- name: runCommand
528536
object: *database
@@ -553,7 +561,7 @@ tests:
553561

554562
- description: "network error in response to copydbsaslstart is not redacted"
555563
runOnRequirements:
556-
- maxServerVersion: "4.0.99" # this commmand was removed in MongoDB 4.2 and the server returns CommandNotFound before hitting the failpoint
564+
- maxServerVersion: 4.0.99 # copydbsaslstart was removed as of 4.2 via SERVER-36211
557565
operations:
558566
- name: failPoint
559567
object: testRunner
@@ -593,6 +601,8 @@ tests:
593601
failure: { $$exists: true }
594602

595603
- description: "copydb command and resulting server-generated error are redacted"
604+
runOnRequirements:
605+
- maxServerVersion: 4.0.99 # copydb was removed as of 4.2 via SERVER-36257
596606
operations:
597607
- name: runCommand
598608
object: *database
@@ -623,7 +633,7 @@ tests:
623633

624634
- description: "network error in response to copydb is not redacted"
625635
runOnRequirements:
626-
- maxServerVersion: "4.0.99" # this commmand was removed in MongoDB 4.2 and the server returns CommandNotFound before hitting the failpoint
636+
- maxServerVersion: 4.0.99 # copydb was removed as of 4.2 via SERVER-36257
627637
operations:
628638
- name: failPoint
629639
object: testRunner

src/test/spec/json/command-logging-and-monitoring/monitoring/redacted-commands.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@
162162
},
163163
{
164164
"description": "getnonce",
165+
"runOnRequirements": [
166+
{
167+
"maxServerVersion": "6.1.99"
168+
}
169+
],
165170
"operations": [
166171
{
167172
"name": "runCommand",
@@ -293,6 +298,11 @@
293298
},
294299
{
295300
"description": "copydbgetnonce",
301+
"runOnRequirements": [
302+
{
303+
"maxServerVersion": "3.6.99"
304+
}
305+
],
296306
"operations": [
297307
{
298308
"name": "runCommand",
@@ -328,6 +338,11 @@
328338
},
329339
{
330340
"description": "copydbsaslstart",
341+
"runOnRequirements": [
342+
{
343+
"maxServerVersion": "4.0.99"
344+
}
345+
],
331346
"operations": [
332347
{
333348
"name": "runCommand",
@@ -363,6 +378,11 @@
363378
},
364379
{
365380
"description": "copydb",
381+
"runOnRequirements": [
382+
{
383+
"maxServerVersion": "4.0.99"
384+
}
385+
],
366386
"operations": [
367387
{
368388
"name": "runCommand",

src/test/spec/json/command-logging-and-monitoring/monitoring/redacted-commands.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ tests:
9393
payload: { $$exists: false }
9494

9595
- description: "getnonce"
96+
runOnRequirements:
97+
- maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007
9698
operations:
9799
- name: runCommand
98100
object: *database
@@ -159,6 +161,8 @@ tests:
159161
roles: { $$exists: false }
160162

161163
- description: "copydbgetnonce"
164+
runOnRequirements:
165+
- maxServerVersion: 3.6.99 # copydbgetnonce was removed as of 4.0 via SERVER-32276
162166
operations:
163167
- name: runCommand
164168
object: *database
@@ -176,6 +180,8 @@ tests:
176180
command: { copydbgetnonce: { $$exists: false } }
177181

178182
- description: "copydbsaslstart"
183+
runOnRequirements:
184+
- maxServerVersion: 4.0.99 # copydbsaslstart was removed as of 4.2 via SERVER-36211
179185
operations:
180186
- name: runCommand
181187
object: *database
@@ -193,6 +199,8 @@ tests:
193199
command: { copydbsaslstart: { $$exists: false } }
194200

195201
- description: "copydb"
202+
runOnRequirements:
203+
- maxServerVersion: 4.0.99 # copydb was removed as of 4.2 via SERVER-36257
196204
operations:
197205
- name: runCommand
198206
object: *database

0 commit comments

Comments
 (0)