-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GODRIVER-2420 sync validatorAndPartialFieldExpression + create-and-cr…
…eateIndexes tests (#967) * resync tests * use 1.5.0-alpha2
- Loading branch information
Showing
7 changed files
with
1,669 additions
and
0 deletions.
There are no files selected for viewing
115 changes: 115 additions & 0 deletions
115
data/client-side-encryption/create-and-createIndexes.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,115 @@ | ||
{ | ||
"runOn": [ | ||
{ | ||
"minServerVersion": "4.1.10" | ||
} | ||
], | ||
"database_name": "default", | ||
"collection_name": "default", | ||
"data": [], | ||
"tests": [ | ||
{ | ||
"description": "create is OK", | ||
"clientOptions": { | ||
"autoEncryptOpts": { | ||
"kmsProviders": { | ||
"local": { | ||
"key": { | ||
"$binary": { | ||
"base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", | ||
"subType": "00" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"operations": [ | ||
{ | ||
"name": "dropCollection", | ||
"object": "database", | ||
"arguments": { | ||
"collection": "unencryptedCollection" | ||
} | ||
}, | ||
{ | ||
"name": "createCollection", | ||
"object": "database", | ||
"arguments": { | ||
"collection": "unencryptedCollection", | ||
"validator": { | ||
"unencrypted_string": "foo" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "assertCollectionExists", | ||
"object": "testRunner", | ||
"arguments": { | ||
"database": "default", | ||
"collection": "unencryptedCollection" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "createIndexes is OK", | ||
"clientOptions": { | ||
"autoEncryptOpts": { | ||
"kmsProviders": { | ||
"local": { | ||
"key": { | ||
"$binary": { | ||
"base64": "Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk", | ||
"subType": "00" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"operations": [ | ||
{ | ||
"name": "dropCollection", | ||
"object": "database", | ||
"arguments": { | ||
"collection": "unencryptedCollection" | ||
} | ||
}, | ||
{ | ||
"name": "createCollection", | ||
"object": "database", | ||
"arguments": { | ||
"collection": "unencryptedCollection" | ||
} | ||
}, | ||
{ | ||
"name": "runCommand", | ||
"object": "database", | ||
"arguments": { | ||
"command": { | ||
"createIndexes": "unencryptedCollection", | ||
"indexes": [ | ||
{ | ||
"name": "name", | ||
"key": { | ||
"name": 1 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "assertIndexExists", | ||
"object": "testRunner", | ||
"arguments": { | ||
"database": "default", | ||
"collection": "unencryptedCollection", | ||
"index": "name" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
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,58 @@ | ||
runOn: | ||
- minServerVersion: "4.1.10" | ||
database_name: &database_name "default" | ||
collection_name: &collection_name "default" | ||
|
||
data: [] | ||
tests: | ||
- description: "create is OK" | ||
clientOptions: | ||
autoEncryptOpts: | ||
kmsProviders: | ||
local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} | ||
operations: | ||
# Drop to remove a collection that may exist from previous test runs. | ||
- name: dropCollection | ||
object: database | ||
arguments: | ||
collection: "unencryptedCollection" | ||
- name: createCollection | ||
object: database | ||
arguments: | ||
collection: "unencryptedCollection" | ||
validator: | ||
unencrypted_string: "foo" | ||
- name: assertCollectionExists | ||
object: testRunner | ||
arguments: | ||
database: *database_name | ||
collection: "unencryptedCollection" | ||
- description: "createIndexes is OK" | ||
clientOptions: | ||
autoEncryptOpts: | ||
kmsProviders: | ||
local: {'key': {'$binary': {'base64': 'Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk', 'subType': '00'}}} | ||
operations: | ||
# Drop to remove a collection that may exist from previous test runs. | ||
- name: dropCollection | ||
object: database | ||
arguments: | ||
collection: "unencryptedCollection" | ||
- name: createCollection | ||
object: database | ||
arguments: | ||
collection: "unencryptedCollection" | ||
- name: runCommand | ||
object: database | ||
arguments: | ||
command: | ||
createIndexes: "unencryptedCollection" | ||
indexes: | ||
- name: "name" | ||
key: { name: 1 } | ||
- name: assertIndexExists | ||
object: testRunner | ||
arguments: | ||
database: *database_name | ||
collection: "unencryptedCollection" | ||
index: name |
Oops, something went wrong.