Skip to content

RUBY-2899 Fix comment helper specification tests #2421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions spec/spec_tests/data/crud_unified/bulkWrite-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ initialData: &initial_data
- _id: 4
x: 44

# Tests in this file differs from the one in specification repo because
# Ruby dirver does not group bulk write operations by command.
# See https://jira.mongodb.org/browse/DRIVERS-2215
tests:
- description: 'BulkWrite with string comment'
runOnRequirements:
Expand All @@ -48,15 +51,15 @@ tests:
- updateOne:
filter: &updateOne_filter
_id: 2
update: &update { x: "updated" }
update: &update { $set: {x: "updated"} }
- deleteOne:
filter: &deleteOne_filter
_id: 3
comment: &string_comment "comment"
expectResult: &expect_results
deletedCount: 1
insertedCount: 1
insertedIds: { 0: 5 }
insertedIds: { $$unsetOrMatches: { 0: 5} }
matchedCount: 2
modifiedCount: 2
upsertedCount: 0
Expand Down Expand Up @@ -92,6 +95,7 @@ tests:
delete: *collection_name
deletes:
- q: *deleteOne_filter
limit: 1
ordered: true
comment: *string_comment
outcome: &outcome
Expand Down Expand Up @@ -148,6 +152,7 @@ tests:
delete: *collection_name
deletes:
- q: *deleteOne_filter
limit: 1
ordered: true
comment: *document_comment
outcome: *outcome
Expand Down
6 changes: 4 additions & 2 deletions spec/spec_tests/data/crud_unified/updateMany-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ tests:
object: *collection0
arguments:
filter: &filter { _id: 1 }
update: &update
- $set: { x: 22 }
update: &update { $set: {x: 22} }
comment: "comment"
expectEvents:
- client: *client0
Expand All @@ -42,6 +41,7 @@ tests:
-
q: *filter
u: *update
multi: true
comment: "comment"
outcome: &outcome
- collectionName: *collection0Name
Expand Down Expand Up @@ -69,6 +69,7 @@ tests:
-
q: *filter
u: *update
multi: true
comment: *comment
outcome: *outcome

Expand All @@ -94,5 +95,6 @@ tests:
-
q: *filter
u: *update
multi: true
comment: "comment"
outcome: *initialData
2 changes: 1 addition & 1 deletion spec/spec_tests/data/crud_unified/updateOne-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tests:
object: *collection0
arguments:
filter: &filter { _id: 1 }
update: &update { x: 22 }
update: &update { $set: {x: 22} }
comment: "comment"
expectEvents:
- client: *client0
Expand Down