-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* RUBY-3205 Deprecate collStats * Consider createOptions in unified spec runner * Update lib/mongo/collection.rb Co-authored-by: Jamis Buck <[email protected]> --------- Co-authored-by: Jamis Buck <[email protected]>
- Loading branch information
1 parent
5a6a8c0
commit eef4b20
Showing
9 changed files
with
76 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,6 @@ module SessionsSupported | |
|
||
READ_COMMANDS = [ | ||
:aggregate, | ||
:collStats, | ||
:count, | ||
:dbStats, | ||
:distinct, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
spec/spec_tests/data/unified/valid-pass/collectionData-createOptions.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
description: collectionData-createOptions | ||
schemaVersion: "1.9" | ||
runOnRequirements: | ||
- minServerVersion: "3.6" | ||
# Capped collections cannot be created on serverless instances. | ||
serverless: forbid | ||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name database0 | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name coll0 | ||
initialData: | ||
- collectionName: *collection0Name | ||
databaseName: *database0Name | ||
createOptions: | ||
capped: true | ||
# With MMAPv1, the size field cannot be less than 4096. | ||
size: &cappedSize 4096 | ||
documents: | ||
- { _id: 1, x: 11 } | ||
tests: | ||
- description: collection is created with the correct options | ||
operations: | ||
- object: *collection0 | ||
name: aggregate | ||
arguments: | ||
pipeline: | ||
- $collStats: { storageStats: {} } | ||
- $project: { capped: '$storageStats.capped', maxSize: '$storageStats.maxSize'} | ||
expectResult: | ||
- { capped: true, maxSize: *cappedSize } |