Skip to content

Commit 5d11fe0

Browse files
authored
Sync valid-pass/valid-fail tests from unified test specification (#1517)
JAVA-5630
1 parent a8a5577 commit 5d11fe0

22 files changed

+1103
-35
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"description": "kmsProviders-missing_aws_kms_credentials",
3+
"schemaVersion": "1.8",
4+
"runOnRequirements": [
5+
{
6+
"csfle": true
7+
}
8+
],
9+
"createEntities": [
10+
{
11+
"client": {
12+
"id": "client0"
13+
}
14+
},
15+
{
16+
"clientEncryption": {
17+
"id": "clientEncryption0",
18+
"clientEncryptionOpts": {
19+
"keyVaultClient": "client0",
20+
"keyVaultNamespace": "keyvault.datakeys",
21+
"kmsProviders": {
22+
"aws": {
23+
"accessKeyId": "accessKeyId"
24+
}
25+
}
26+
}
27+
}
28+
}
29+
],
30+
"tests": [
31+
{
32+
"description": "",
33+
"operations": []
34+
}
35+
]
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"description": "kmsProviders-missing_azure_kms_credentials",
3+
"schemaVersion": "1.8",
4+
"runOnRequirements": [
5+
{
6+
"csfle": true
7+
}
8+
],
9+
"createEntities": [
10+
{
11+
"client": {
12+
"id": "client0"
13+
}
14+
},
15+
{
16+
"clientEncryption": {
17+
"id": "clientEncryption0",
18+
"clientEncryptionOpts": {
19+
"keyVaultClient": "client0",
20+
"keyVaultNamespace": "keyvault.datakeys",
21+
"kmsProviders": {
22+
"azure": {
23+
"tenantId": "tenantId"
24+
}
25+
}
26+
}
27+
}
28+
}
29+
],
30+
"tests": [
31+
{
32+
"description": "",
33+
"operations": []
34+
}
35+
]
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"description": "kmsProviders-missing_gcp_kms_credentials",
3+
"schemaVersion": "1.8",
4+
"runOnRequirements": [
5+
{
6+
"csfle": true
7+
}
8+
],
9+
"createEntities": [
10+
{
11+
"client": {
12+
"id": "client0"
13+
}
14+
},
15+
{
16+
"clientEncryption": {
17+
"id": "clientEncryption0",
18+
"clientEncryptionOpts": {
19+
"keyVaultClient": "client0",
20+
"keyVaultNamespace": "keyvault.datakeys",
21+
"kmsProviders": {
22+
"gcp": {
23+
"email": "email"
24+
}
25+
}
26+
}
27+
}
28+
}
29+
],
30+
"tests": [
31+
{
32+
"description": "",
33+
"operations": []
34+
}
35+
]
36+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"description": "clientEncryptionOpts-no_kms",
3+
"schemaVersion": "1.8",
4+
"runOnRequirements": [
5+
{
6+
"csfle": true
7+
}
8+
],
9+
"createEntities": [
10+
{
11+
"client": {
12+
"id": "client0"
13+
}
14+
},
15+
{
16+
"clientEncryption": {
17+
"id": "clientEncryption0",
18+
"clientEncryptionOpts": {
19+
"keyVaultClient": "client0",
20+
"keyVaultNamespace": "keyvault.datakeys",
21+
"kmsProviders": {}
22+
}
23+
}
24+
}
25+
],
26+
"tests": [
27+
{
28+
"description": "",
29+
"operations": []
30+
}
31+
]
32+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"description": "collectionData-createOptions",
3+
"schemaVersion": "1.9",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "3.6",
7+
"serverless": "forbid"
8+
}
9+
],
10+
"createEntities": [
11+
{
12+
"client": {
13+
"id": "client0"
14+
}
15+
},
16+
{
17+
"database": {
18+
"id": "database0",
19+
"client": "client0",
20+
"databaseName": "database0"
21+
}
22+
},
23+
{
24+
"collection": {
25+
"id": "collection0",
26+
"database": "database0",
27+
"collectionName": "coll0"
28+
}
29+
}
30+
],
31+
"initialData": [
32+
{
33+
"collectionName": "coll0",
34+
"databaseName": "database0",
35+
"createOptions": {
36+
"capped": true,
37+
"size": 4096
38+
},
39+
"documents": [
40+
{
41+
"_id": 1,
42+
"x": 11
43+
}
44+
]
45+
}
46+
],
47+
"tests": [
48+
{
49+
"description": "collection is created with the correct options",
50+
"operations": [
51+
{
52+
"object": "collection0",
53+
"name": "aggregate",
54+
"arguments": {
55+
"pipeline": [
56+
{
57+
"$collStats": {
58+
"storageStats": {}
59+
}
60+
},
61+
{
62+
"$project": {
63+
"capped": "$storageStats.capped",
64+
"maxSize": "$storageStats.maxSize"
65+
}
66+
}
67+
]
68+
},
69+
"expectResult": [
70+
{
71+
"capped": true,
72+
"maxSize": 4096
73+
}
74+
]
75+
}
76+
]
77+
}
78+
]
79+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"description": "createEntities-operation",
3+
"schemaVersion": "1.9",
4+
"tests": [
5+
{
6+
"description": "createEntities operation",
7+
"operations": [
8+
{
9+
"name": "createEntities",
10+
"object": "testRunner",
11+
"arguments": {
12+
"entities": [
13+
{
14+
"client": {
15+
"id": "client1",
16+
"observeEvents": [
17+
"commandStartedEvent"
18+
]
19+
}
20+
},
21+
{
22+
"database": {
23+
"id": "database1",
24+
"client": "client1",
25+
"databaseName": "database1"
26+
}
27+
},
28+
{
29+
"collection": {
30+
"id": "collection1",
31+
"database": "database1",
32+
"collectionName": "coll1"
33+
}
34+
}
35+
]
36+
}
37+
},
38+
{
39+
"name": "deleteOne",
40+
"object": "collection1",
41+
"arguments": {
42+
"filter": {
43+
"_id": 1
44+
}
45+
}
46+
}
47+
],
48+
"expectEvents": [
49+
{
50+
"client": "client1",
51+
"events": [
52+
{
53+
"commandStartedEvent": {
54+
"command": {
55+
"delete": "coll1",
56+
"deletes": [
57+
{
58+
"q": {
59+
"_id": 1
60+
},
61+
"limit": 1
62+
}
63+
]
64+
},
65+
"commandName": "delete",
66+
"databaseName": "database1"
67+
}
68+
}
69+
]
70+
}
71+
]
72+
}
73+
]
74+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy