Skip to content

Commit

Permalink
DRIVERS-2452 Update unified test format
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Jun 16, 2023
1 parent 537947f commit 083493a
Show file tree
Hide file tree
Showing 9 changed files with 811 additions and 11 deletions.
26 changes: 17 additions & 9 deletions source/command-logging-and-monitoring/tests/monitoring/find.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "find",
"schemaVersion": "1.1",
"schemaVersion": "1.15",
"createEntities": [
{
"client": {
Expand Down Expand Up @@ -103,7 +103,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -198,7 +199,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -262,7 +264,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -338,7 +341,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
},
{
Expand Down Expand Up @@ -376,7 +380,8 @@
]
}
},
"commandName": "getMore"
"commandName": "getMore",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -464,7 +469,8 @@
]
}
},
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
},
{
Expand Down Expand Up @@ -498,7 +504,8 @@
]
}
},
"commandName": "getMore"
"commandName": "getMore",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down Expand Up @@ -539,7 +546,8 @@
},
{
"commandFailedEvent": {
"commandName": "find"
"commandName": "find",
"databaseName": "command-monitoring-tests"
}
}
]
Expand Down
10 changes: 9 additions & 1 deletion source/command-logging-and-monitoring/tests/monitoring/find.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description: "find"

schemaVersion: "1.1"
schemaVersion: "1.15"

createEntities:
- client:
Expand Down Expand Up @@ -56,6 +56,7 @@ tests:
firstBatch:
- { _id: 1, x: 11 }
commandName: find
databaseName: *databaseName

- description: "A successful find with options"
operations:
Expand Down Expand Up @@ -98,6 +99,7 @@ tests:
- { x: 33 }
- { x: 22 }
commandName: find
databaseName: *databaseName

- description: "A successful find with showRecordId and returnKey"
operations:
Expand Down Expand Up @@ -131,6 +133,7 @@ tests:
- { _id: 4 }
- { _id: 5 }
commandName: find
databaseName: *databaseName

- description: "A successful find with a getMore"
operations:
Expand Down Expand Up @@ -162,6 +165,7 @@ tests:
- { _id: 2, x: 22 }
- { _id: 3, x: 33 }
commandName: find
databaseName: *databaseName
- commandStartedEvent:
command:
getMore: { $$type: [ int, long ] }
Expand All @@ -179,6 +183,7 @@ tests:
- { _id: 4, x: 44 }
- { _id: 5, x: 55 }
commandName: getMore
databaseName: *databaseName

- description: "A successful find event with a getmore and the server kills the cursor (<= 4.4)"
runOnRequirements:
Expand Down Expand Up @@ -216,6 +221,7 @@ tests:
- { _id: 2, x: 22 }
- { _id: 3, x: 33 }
commandName: find
databaseName: *databaseName
- commandStartedEvent:
command:
getMore: { $$type: [ int, long ] }
Expand All @@ -232,6 +238,7 @@ tests:
nextBatch:
- { _id: 4, x: 44 }
commandName: getMore
databaseName: *databaseName

- description: "A failed find event"
operations:
Expand All @@ -252,3 +259,4 @@ tests:
databaseName: *databaseName
- commandFailedEvent:
commandName: find
databaseName: *databaseName
Loading

0 comments on commit 083493a

Please sign in to comment.