Skip to content

Commit

Permalink
Merge pull request #126 from mongodb/spec-173
Browse files Browse the repository at this point in the history
SPEC-173: Document tests conditional on server version
  • Loading branch information
jmikola authored Jan 10, 2017
2 parents 2a61f4b + a0cebef commit 16b96fd
Show file tree
Hide file tree
Showing 47 changed files with 3,716 additions and 2,692 deletions.
70 changes: 35 additions & 35 deletions source/crud/tests/read/aggregate-collation.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"data": [
{
"_id": 1,
"x": "ping"
}
],
"minServerVersion": "3.4",
"tests": [
{
"description": "Aggregate with collation",
"operation": {
"arguments": {
"collation": {
"locale": "en_US",
"strength": 2
},
"pipeline": [
{
"$match": {
"x": "PING"
}
}
]
},
"name": "aggregate"
},
"outcome": {
"result": [
{
"_id": 1,
"x": "ping"
}
]
"data": [
{
"_id": 1,
"x": "ping"
}
],
"minServerVersion": "3.4",
"tests": [
{
"description": "Aggregate with collation",
"operation": {
"name": "aggregate",
"arguments": {
"pipeline": [
{
"$match": {
"x": "PING"
}
}
],
"collation": {
"locale": "en_US",
"strength": 2
}
}
]
}
},
"outcome": {
"result": [
{
"_id": 1,
"x": "ping"
}
]
}
}
]
}
130 changes: 65 additions & 65 deletions source/crud/tests/read/aggregate-out.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
{
"data": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"data": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
],
"minServerVersion": "2.6",
"tests": [
{
"description": "Aggregate with $out",
"operation": {
"name": "aggregate",
"arguments": {
"pipeline": [
{
"$sort": {
"x": 1
}
},
{
"$match": {
"_id": {
"$gt": 1
}
}
},
{
"$out": "other_test_collection"
}
],
"batchSize": 2
}
},
"outcome": {
"result": [
{
"_id": 2,
"x": 22
},
{
"_id": 3,
},
{
"_id": 3,
"x": 33
}
],
"minServerVersion": "2.6",
"tests": [
{
"description": "Aggregate with $out",
"operation": {
"arguments": {
"batchSize": 2,
"pipeline": [
{
"$sort": {
"x": 1
}
},
{
"$match": {
"_id": {
"$gt": 1
}
}
},
{
"$out": "other_test_collection"
}
]
},
"name": "aggregate"
},
"outcome": {
"collection": {
"data": [
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
],
"name": "other_test_collection"
},
"result": [
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
]
}
],
"collection": {
"name": "other_test_collection",
"data": [
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
]
}
]
}
}
}
]
}
100 changes: 50 additions & 50 deletions source/crud/tests/read/aggregate.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
{
"data": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
],
"tests": [
{
"description": "Aggregate with multiple stages",
"operation": {
"arguments": {
"batchSize": 2,
"pipeline": [
{
"$sort": {
"x": 1
}
},
{
"$match": {
"_id": {
"$gt": 1
}
}
}
]
},
"name": "aggregate"
},
"outcome": {
"result": [
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
]
"data": [
{
"_id": 1,
"x": 11
},
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
],
"tests": [
{
"description": "Aggregate with multiple stages",
"operation": {
"name": "aggregate",
"arguments": {
"pipeline": [
{
"$sort": {
"x": 1
}
},
{
"$match": {
"_id": {
"$gt": 1
}
}
}
],
"batchSize": 2
}
]
}
},
"outcome": {
"result": [
{
"_id": 2,
"x": 22
},
{
"_id": 3,
"x": 33
}
]
}
}
]
}
54 changes: 27 additions & 27 deletions source/crud/tests/read/count-collation.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"data": [
{
"_id": 1,
"x": "PING"
"data": [
{
"_id": 1,
"x": "PING"
}
],
"minServerVersion": "3.4",
"tests": [
{
"description": "Count with collation",
"operation": {
"name": "count",
"arguments": {
"filter": {
"x": "ping"
},
"collation": {
"locale": "en_US",
"strength": 2
}
}
],
"minServerVersion": "3.4",
"tests": [
{
"description": "Count with collation",
"operation": {
"arguments": {
"collation": {
"locale": "en_US",
"strength": 2
},
"filter": {
"x": "ping"
}
},
"name": "count"
},
"outcome": {
"result": 1
}
}
]
}
},
"outcome": {
"result": 1
}
}
]
}
Loading

0 comments on commit 16b96fd

Please sign in to comment.