Skip to content

Commit 84b205f

Browse files
authored
RUBY-3280 Serverless tests failing on 2.18-stable (#2742)
* bump drivers-evergreen-tools * update YAML specs for redacted-commands * make sure auth requirements are checked correctly * update another spec file to fix a failing test
1 parent 3c11a2f commit 84b205f

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

spec/runners/crud/requirement.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def satisfied?
109109
end
110110
end
111111
if @auth == true
112-
ok &&= cc.auth_enabled?
112+
ok &&= SpecConfig.instance.auth?
113113
elsif @auth == false
114-
ok &&= !cc.auth_enabled?
114+
ok &&= !SpecConfig.instance.auth?
115115
end
116116
if @csfle
117117
ok &&= !!(ENV['LIBMONGOCRYPT_PATH'] || ENV['FLE'])

spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ description: "change-streams-showExpandedEvents"
22
schemaVersion: "1.7"
33
runOnRequirements:
44
- minServerVersion: "6.0.0"
5-
topologies: [ replicaset, sharded-replicaset, sharded ]
5+
topologies: [ replicaset, sharded ]
6+
serverless: forbid
67
createEntities:
78
- client:
89
id: &client0 client0
@@ -160,7 +161,15 @@ tests:
160161
- name: createChangeStream
161162
object: *collection0
162163
arguments:
163-
pipeline: []
164+
pipeline:
165+
# On sharded clusters, the create command run when loading initial
166+
# data sometimes is still reported in the change stream. To avoid
167+
# this, we exclude the create command when creating the change
168+
# stream, but specifically don't exclude other events to still catch
169+
# driver errors.
170+
- $match:
171+
operationType:
172+
$ne: create
164173
showExpandedEvents: true
165174
saveResultAsEntity: &changeStream0 changeStream0
166175
- name: createIndex
@@ -259,17 +268,16 @@ tests:
259268
arguments:
260269
command:
261270
collMod: *collection0
262-
# Added here to fix our tests as we require a commandName but don't
263-
# do anything with it.
264-
commandName: modify_collection
271+
commandName: collMod
265272
- name: iterateUntilDocumentOrError
266273
object: *changeStream0
267274
expectResult:
268275
operationType: modify
269276

270277
- description: "when showExpandedEvents is true, shardCollection events are reported"
271278
runOnRequirements:
272-
- topologies: [ sharded-replicaset, sharded ]
279+
# Note: minServerVersion is specified in top-level runOnRequirements
280+
- topologies: [ sharded ]
273281
operations:
274282
- name: dropCollection
275283
object: *shardedDb
@@ -292,6 +300,7 @@ tests:
292300
shardCollection: shardedDb.shardedCollection
293301
key:
294302
_id: 1
303+
commandName: shardCollection
295304
- name: iterateUntilDocumentOrError
296305
object: *changeStream0
297306
expectResult:

spec/spec_tests/data/command_monitoring_unified/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)