-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GODRIVER-2396 Add ChangeStreamPreAndPostImages to CreateCollectionOpt…
…ions. (#941)
- Loading branch information
1 parent
ed33f31
commit 189a713
Showing
11 changed files
with
390 additions
and
27 deletions.
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
data/collection-management/createCollection-pre_and_post_images.json
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,91 @@ | ||
{ | ||
"description": "createCollection-pre_and_post_images", | ||
"schemaVersion": "1.0", | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "6.0" | ||
} | ||
], | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"observeEvents": [ | ||
"commandStartedEvent" | ||
] | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "database0", | ||
"client": "client0", | ||
"databaseName": "papi-tests" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "collection0", | ||
"database": "database0", | ||
"collectionName": "test" | ||
} | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "createCollection with changeStreamPreAndPostImages enabled", | ||
"operations": [ | ||
{ | ||
"name": "dropCollection", | ||
"object": "database0", | ||
"arguments": { | ||
"collection": "test" | ||
} | ||
}, | ||
{ | ||
"name": "createCollection", | ||
"object": "database0", | ||
"arguments": { | ||
"collection": "test", | ||
"changeStreamPreAndPostImages": { | ||
"enabled": true | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "assertCollectionExists", | ||
"object": "testRunner", | ||
"arguments": { | ||
"databaseName": "papi-tests", | ||
"collectionName": "test" | ||
} | ||
} | ||
], | ||
"expectEvents": [ | ||
{ | ||
"client": "client0", | ||
"events": [ | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"drop": "test" | ||
}, | ||
"databaseName": "papi-tests" | ||
} | ||
}, | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"create": "test", | ||
"changeStreamPreAndPostImages": { | ||
"enabled": true | ||
} | ||
}, | ||
"databaseName": "papi-tests" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
49 changes: 49 additions & 0 deletions
49
data/collection-management/createCollection-pre_and_post_images.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,49 @@ | ||
description: "createCollection-pre_and_post_images" | ||
|
||
schemaVersion: "1.0" | ||
|
||
runOnRequirements: | ||
- minServerVersion: "6.0" | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
observeEvents: [ commandStartedEvent ] | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name papi-tests | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name test | ||
|
||
tests: | ||
- description: "createCollection with changeStreamPreAndPostImages enabled" | ||
operations: | ||
- name: dropCollection | ||
object: *database0 | ||
arguments: | ||
collection: *collection0Name | ||
- name: createCollection | ||
object: *database0 | ||
arguments: | ||
collection: *collection0Name | ||
changeStreamPreAndPostImages: { enabled: true } | ||
- name: assertCollectionExists | ||
object: testRunner | ||
arguments: | ||
databaseName: *database0Name | ||
collectionName: *collection0Name | ||
expectEvents: | ||
- client: *client0 | ||
events: | ||
- commandStartedEvent: | ||
command: | ||
drop: *collection0Name | ||
databaseName: *database0Name | ||
- commandStartedEvent: | ||
command: | ||
create: *collection0Name | ||
changeStreamPreAndPostImages: { enabled: true } | ||
databaseName: *database0Name |
110 changes: 110 additions & 0 deletions
110
data/collection-management/modifyCollection-pre_and_post_images.json
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,110 @@ | ||
{ | ||
"description": "modifyCollection-pre_and_post_images", | ||
"schemaVersion": "1.0", | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "6.0" | ||
} | ||
], | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"observeEvents": [ | ||
"commandStartedEvent" | ||
] | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "database0", | ||
"client": "client0", | ||
"databaseName": "papi-tests" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "collection0", | ||
"database": "database0", | ||
"collectionName": "test" | ||
} | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "modifyCollection to changeStreamPreAndPostImages enabled", | ||
"operations": [ | ||
{ | ||
"name": "dropCollection", | ||
"object": "database0", | ||
"arguments": { | ||
"collection": "test" | ||
} | ||
}, | ||
{ | ||
"name": "createCollection", | ||
"object": "database0", | ||
"arguments": { | ||
"collection": "test", | ||
"changeStreamPreAndPostImages": { | ||
"enabled": false | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "assertCollectionExists", | ||
"object": "testRunner", | ||
"arguments": { | ||
"databaseName": "papi-tests", | ||
"collectionName": "test" | ||
} | ||
}, | ||
{ | ||
"name": "modifyCollection", | ||
"object": "database0", | ||
"arguments": { | ||
"collection": "test", | ||
"changeStreamPreAndPostImages": { | ||
"enabled": true | ||
} | ||
} | ||
} | ||
], | ||
"expectEvents": [ | ||
{ | ||
"client": "client0", | ||
"events": [ | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"drop": "test" | ||
}, | ||
"databaseName": "papi-tests" | ||
} | ||
}, | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"create": "test", | ||
"changeStreamPreAndPostImages": { | ||
"enabled": false | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"commandStartedEvent": { | ||
"command": { | ||
"collMod": "test", | ||
"changeStreamPreAndPostImages": { | ||
"enabled": true | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
57 changes: 57 additions & 0 deletions
57
data/collection-management/modifyCollection-pre_and_post_images.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,57 @@ | ||
description: "modifyCollection-pre_and_post_images" | ||
|
||
schemaVersion: "1.0" | ||
|
||
runOnRequirements: | ||
- minServerVersion: "6.0" | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
observeEvents: [ commandStartedEvent ] | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &database0Name papi-tests | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collection0Name test | ||
|
||
tests: | ||
- description: "modifyCollection to changeStreamPreAndPostImages enabled" | ||
operations: | ||
- name: dropCollection | ||
object: *database0 | ||
arguments: | ||
collection: *collection0Name | ||
- name: createCollection | ||
object: *database0 | ||
arguments: | ||
collection: *collection0Name | ||
changeStreamPreAndPostImages: { enabled: false } | ||
- name: assertCollectionExists | ||
object: testRunner | ||
arguments: | ||
databaseName: *database0Name | ||
collectionName: *collection0Name | ||
- name: modifyCollection | ||
object: *database0 | ||
arguments: | ||
collection: *collection0Name | ||
changeStreamPreAndPostImages: { enabled: true } | ||
expectEvents: | ||
- client: *client0 | ||
events: | ||
- commandStartedEvent: | ||
command: | ||
drop: *collection0Name | ||
databaseName: *database0Name | ||
- commandStartedEvent: | ||
command: | ||
create: *collection0Name | ||
changeStreamPreAndPostImages: { enabled: false } | ||
- commandStartedEvent: | ||
command: | ||
collMod: *collection0Name | ||
changeStreamPreAndPostImages: { enabled: true } |
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
Oops, something went wrong.