Skip to content

DRIVERS-555 Unified test format changes for CSOT #959

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 14 commits into from
Apr 27, 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
563 changes: 563 additions & 0 deletions source/unified-test-format/schema-1.9.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion source/unified-test-format/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCHEMA=../schema-1.8.json
SCHEMA=../schema-1.9.json

.PHONY: all invalid valid-fail valid-pass versioned-api load-balancers gridfs transactions crud collection-management sessions command-monitoring HAS_AJV

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- collectionName: *collection0Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- databaseName: *database0Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- collectionName: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"description": "collectionData-createOptions-type",
"schemaVersion": "1.9",
"createEntities": [
{
"client": {
"id": "client0"
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "foo"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo"
}
}
],
"initialData": [
{
"collectionName": "foo",
"databaseName": "foo",
"createOptions": 0,
"documents": []
}
],
"tests": [
{
"description": "foo",
"operations": []
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
description: "collectionData-createOptions-type"

schemaVersion: "1.9"

createEntities:
- client:
id: &client0 "client0"
- database:
id: &database0 "database0"
client: *client0
databaseName: &database0Name "foo"
- collection:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"

initialData:
- collectionName: *collection0Name
databaseName: *database0Name
createOptions: 0
documents: []

tests:
- description: "foo"
operations: []
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- collectionName: *collection0Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- collectionName: *collection0Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- collectionName: *collection0Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- collectionName: *collection0Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "foo",
"foo": 0
"collectionName": "foo"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ createEntities:
id: &collection0 "collection0"
database: *database0
collectionName: &collection0Name "foo"
foo: 0

initialData:
- collectionName: *collection0Name
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"description": "collectionOrDatabaseOptions-timeoutMS-type",
"schemaVersion": "1.9",
"createEntities": [
{
"client": {
"id": "client0"
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "foo",
"databaseOptions": {
"timeoutMS": 4.5
}
}
}
],
"tests": [
{
"description": "foo",
"operations": []
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description: "collectionOrDatabaseOptions-timeoutMS-type"

schemaVersion: "1.9"

createEntities:
- client:
id: &client0 "client0"
- database:
id: &database0 "database0"
client: *client0
databaseName: "foo"
databaseOptions:
timeoutMS: 4.5 # Must be an integer, not a float.

tests:
- description: "foo"
operations: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"description": "expectedError-isTimeoutError-type",
"schemaVersion": "1.9",
"createEntities": [
{
"client": {
"id": "client0"
}
}
],
"tests": [
{
"description": "foo",
"operations": [
{
"name": "foo",
"object": "client0",
"expectError": {
"isTimeoutError": 0
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: "expectedError-isTimeoutError-type"

schemaVersion: "1.9"

createEntities:
- client:
id: &client0 "client0"

tests:
- description: "foo"
operations:
- name: "foo"
object: *client0
expectError:
isTimeoutError: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"description": "collectionData-createOptions",
"schemaVersion": "1.9",
"runOnRequirements": [
{
"minServerVersion": "3.6"
}
],
"createEntities": [
{
"client": {
"id": "client0"
}
},
{
"database": {
"id": "database0",
"client": "client0",
"databaseName": "database0"
}
},
{
"collection": {
"id": "collection0",
"database": "database0",
"collectionName": "coll0"
}
}
],
"initialData": [
{
"collectionName": "coll0",
"databaseName": "database0",
"createOptions": {
"capped": true,
"size": 512
},
"documents": [
{
"_id": 1,
"x": 11
}
]
}
],
"tests": [
{
"description": "collection is created with the correct options",
"operations": [
{
"name": "runCommand",
"object": "database0",
"arguments": {
"commandName": "collStats",
"command": {
"collStats": "coll0",
"scale": 1
}
},
"expectResult": {
"capped": true,
"maxSize": 512
}
}
]
}
]
}
Loading