Skip to content

Commit a1c67e7

Browse files
CSHARP-4416: Remove getNonce command usage for 6.2+. (#997)
1 parent 8f8f7e0 commit a1c67e7

File tree

6 files changed

+67
-4
lines changed

6 files changed

+67
-4
lines changed

specifications/command-logging-and-monitoring/tests/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",

specifications/command-logging-and-monitoring/tests/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

specifications/command-logging-and-monitoring/tests/unified/redacted-commands.json

Lines changed: 5 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",

specifications/command-logging-and-monitoring/tests/unified/redacted-commands.yml

Lines changed: 2 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"
9698
operations:
9799
- name: runCommand
98100
object: *database

specifications/unified-test-format/tests/valid-pass/observeSensitiveCommands.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
"tests": [
6262
{
6363
"description": "getnonce is observed with observeSensitiveCommands=true",
64+
"runOnRequirements": [
65+
{
66+
"maxServerVersion": "6.1.99"
67+
}
68+
],
6469
"operations": [
6570
{
6671
"name": "runCommand",
@@ -106,6 +111,11 @@
106111
},
107112
{
108113
"description": "getnonce is not observed with observeSensitiveCommands=false",
114+
"runOnRequirements": [
115+
{
116+
"maxServerVersion": "6.1.99"
117+
}
118+
],
109119
"operations": [
110120
{
111121
"name": "runCommand",
@@ -127,6 +137,11 @@
127137
},
128138
{
129139
"description": "getnonce is not observed by default",
140+
"runOnRequirements": [
141+
{
142+
"maxServerVersion": "6.1.99"
143+
}
144+
],
130145
"operations": [
131146
{
132147
"name": "runCommand",

specifications/unified-test-format/tests/valid-pass/observeSensitiveCommands.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ createEntities:
3838

3939
tests:
4040
- description: "getnonce is observed with observeSensitiveCommands=true"
41+
runOnRequirements:
42+
- maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007
4143
operations:
4244
- name: runCommand
4345
object: *databaseObserveSensitiveCommands
@@ -57,6 +59,8 @@ tests:
5759
nonce: { $$exists: false }
5860

5961
- description: "getnonce is not observed with observeSensitiveCommands=false"
62+
runOnRequirements:
63+
- maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007
6064
operations:
6165
- name: runCommand
6266
object: *databaseDoNotObserveSensitiveCommands
@@ -68,6 +72,8 @@ tests:
6872
events: []
6973

7074
- description: "getnonce is not observed by default"
75+
runOnRequirements:
76+
- maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007
7177
operations:
7278
- name: runCommand
7379
object: *databaseDoNotObserveSensitiveCommandsByDefault

0 commit comments

Comments
 (0)