Skip to content

Commit 000e50c

Browse files
authored
PYTHON-4266 Migrate Atlas Data Lake tests to unified test format (mongodb#1760)
1 parent d4e5ee1 commit 000e50c

14 files changed

+424
-251
lines changed

test/data_lake/aggregate.json

Lines changed: 0 additions & 53 deletions
This file was deleted.

test/data_lake/estimatedDocumentCount.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

test/data_lake/getMore.json

Lines changed: 0 additions & 57 deletions
This file was deleted.

test/data_lake/listCollections.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

test/data_lake/listDatabases.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

test/data_lake/runCommand.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

test/data_lake/unified/aggregate.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"description": "aggregate",
3+
"schemaVersion": "1.0",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client0",
8+
"observeEvents": [
9+
"commandStartedEvent"
10+
]
11+
}
12+
},
13+
{
14+
"database": {
15+
"id": "database0",
16+
"client": "client0",
17+
"databaseName": "test"
18+
}
19+
},
20+
{
21+
"collection": {
22+
"id": "collection0",
23+
"database": "database0",
24+
"collectionName": "driverdata"
25+
}
26+
}
27+
],
28+
"tests": [
29+
{
30+
"description": "Aggregate with pipeline (project, sort, limit)",
31+
"operations": [
32+
{
33+
"object": "collection0",
34+
"name": "aggregate",
35+
"arguments": {
36+
"pipeline": [
37+
{
38+
"$project": {
39+
"_id": 0
40+
}
41+
},
42+
{
43+
"$sort": {
44+
"a": 1
45+
}
46+
},
47+
{
48+
"$limit": 2
49+
}
50+
]
51+
},
52+
"expectResult": [
53+
{
54+
"a": 1,
55+
"b": 2,
56+
"c": 3
57+
},
58+
{
59+
"a": 2,
60+
"b": 3,
61+
"c": 4
62+
}
63+
]
64+
}
65+
],
66+
"expectEvents": [
67+
{
68+
"client": "client0",
69+
"events": [
70+
{
71+
"commandStartedEvent": {
72+
"command": {
73+
"aggregate": "driverdata"
74+
},
75+
"commandName": "aggregate",
76+
"databaseName": "test"
77+
}
78+
}
79+
]
80+
}
81+
]
82+
}
83+
]
84+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"description": "estimatedDocumentCount",
3+
"schemaVersion": "1.0",
4+
"createEntities": [
5+
{
6+
"client": {
7+
"id": "client0",
8+
"observeEvents": [
9+
"commandStartedEvent"
10+
]
11+
}
12+
},
13+
{
14+
"database": {
15+
"id": "database0",
16+
"client": "client0",
17+
"databaseName": "test"
18+
}
19+
},
20+
{
21+
"collection": {
22+
"id": "collection0",
23+
"database": "database0",
24+
"collectionName": "driverdata"
25+
}
26+
}
27+
],
28+
"tests": [
29+
{
30+
"description": "estimatedDocumentCount succeeds",
31+
"operations": [
32+
{
33+
"object": "collection0",
34+
"name": "estimatedDocumentCount",
35+
"expectResult": 15
36+
}
37+
],
38+
"expectEvents": [
39+
{
40+
"client": "client0",
41+
"events": [
42+
{
43+
"commandStartedEvent": {
44+
"command": {
45+
"count": "driverdata"
46+
},
47+
"commandName": "count",
48+
"databaseName": "test"
49+
}
50+
}
51+
]
52+
}
53+
]
54+
}
55+
]
56+
}

0 commit comments

Comments
 (0)