Skip to content

Commit bdc283c

Browse files
authored
Updates Atlas Data Lake Testing specification tests (#840)
1 parent 884eacb commit bdc283c

File tree

6 files changed

+79
-70
lines changed

6 files changed

+79
-70
lines changed

source/atlas-data-lake-testing/tests/aggregate.json

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,30 @@
2424
"$limit": 2
2525
}
2626
]
27-
}
27+
},
28+
"result": [
29+
{
30+
"a": 1,
31+
"b": 2,
32+
"c": 3
33+
},
34+
{
35+
"a": 2,
36+
"b": 3,
37+
"c": 4
38+
}
39+
]
2840
}
2941
],
30-
"outcome": {
31-
"result": [
32-
{
33-
"a": 1,
34-
"b": 2,
35-
"c": 3
36-
},
37-
{
38-
"a": 2,
39-
"b": 3,
40-
"c": 4
42+
"expectations": [
43+
{
44+
"command_started_event": {
45+
"command": {
46+
"aggregate": "driverdata"
47+
}
4148
}
42-
]
43-
}
49+
}
50+
]
4451
}
4552
]
46-
}
53+
}

source/atlas-data-lake-testing/tests/aggregate.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@ collection_name: &collection_name "driverdata"
22
database_name: &database_name "test"
33

44
tests:
5-
-
6-
description: "Aggregate with pipeline (project, sort, limit)"
7-
operations:
8-
-
9-
object: collection
10-
name: aggregate
11-
arguments:
12-
pipeline:
13-
- $project: { _id: 0 }
14-
- $sort: { a: 1 }
15-
- $limit: 2
16-
outcome:
17-
result:
18-
- { a: 1, b: 2, c: 3 }
19-
- { a: 2, b: 3, c: 4 }
5+
-
6+
description: "Aggregate with pipeline (project, sort, limit)"
7+
operations:
8+
-
9+
object: collection
10+
name: aggregate
11+
arguments:
12+
pipeline:
13+
- $project: { _id: 0 }
14+
- $sort: { a: 1 }
15+
- $limit: 2
16+
result:
17+
- { a: 1, b: 2, c: 3 }
18+
- { a: 2, b: 3, c: 4 }
19+
expectations:
20+
-
21+
command_started_event:
22+
command:
23+
aggregate: *collection_name

source/atlas-data-lake-testing/tests/count.json renamed to source/atlas-data-lake-testing/tests/estimatedDocumentCount.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
]
2323
}
2424
]
25-
}
25+
}

source/atlas-data-lake-testing/tests/find.json

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,34 @@
2121
"a": 1
2222
},
2323
"limit": 5
24-
}
24+
},
25+
"result": [
26+
{
27+
"a": 5,
28+
"b": 6,
29+
"c": 7
30+
},
31+
{
32+
"a": 6,
33+
"b": 7,
34+
"c": 8
35+
},
36+
{
37+
"a": 7,
38+
"b": 8,
39+
"c": 9
40+
},
41+
{
42+
"a": 8,
43+
"b": 9,
44+
"c": 10
45+
},
46+
{
47+
"a": 9,
48+
"b": 10,
49+
"c": 11
50+
}
51+
]
2552
}
2653
],
2754
"expectations": [
@@ -32,36 +59,7 @@
3259
}
3360
}
3461
}
35-
],
36-
"outcome": {
37-
"result": [
38-
{
39-
"a": 5,
40-
"b": 6,
41-
"c": 7
42-
},
43-
{
44-
"a": 6,
45-
"b": 7,
46-
"c": 8
47-
},
48-
{
49-
"a": 7,
50-
"b": 8,
51-
"c": 9
52-
},
53-
{
54-
"a": 8,
55-
"b": 9,
56-
"c": 10
57-
},
58-
{
59-
"a": 9,
60-
"b": 10,
61-
"c": 11
62-
}
63-
]
64-
}
62+
]
6563
}
6664
]
67-
}
65+
}

source/atlas-data-lake-testing/tests/find.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ tests:
1313
projection: { _id: 0 }
1414
sort: { a: 1 }
1515
limit: 5
16+
result:
17+
- {"a": 5, "b": 6, "c": 7}
18+
- {"a": 6, "b": 7, "c": 8}
19+
- {"a": 7, "b": 8, "c": 9}
20+
- {"a": 8, "b": 9, "c": 10}
21+
- {"a": 9, "b": 10, "c": 11}
1622
expectations:
1723
-
1824
command_started_event:
1925
command:
2026
find: *collection_name
21-
outcome:
22-
result:
23-
- {"a": 5, "b": 6, "c": 7}
24-
- {"a": 6, "b": 7, "c": 8}
25-
- {"a": 7, "b": 8, "c": 9}
26-
- {"a": 8, "b": 9, "c": 10}
27-
- {"a": 9, "b": 10, "c": 11}
27+

0 commit comments

Comments
 (0)