Add $ping tests#616
Conversation
Signed-off-by: PatersonProjects <keldonhoff@gmail.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (214+0 LOC, 5 files); LLM: Adds new test cases for the $ping operator following existing diagnostic test patterns, a focused test-coverage addition with minimal LOC impact. If a label is wrong, remove it manually and ping |
| @@ -0,0 +1,64 @@ | |||
| """Tests for ping command core behavior. | |||
|
|
|||
| Validates that ping succeeds on both admin and non-admin databases, | |||
There was a problem hiding this comment.
For consistency with buildInfo and listCommands tests, consider adding a test for ping on a nonexistent database (e.g., collection.database.client["nonexistent_db"]["coll"]).
| pytestmark = pytest.mark.admin | ||
|
|
||
|
|
||
| ERROR_TESTS: list[DiagnosticTestCase] = [ |
There was a problem hiding this comment.
For consistency with buildInfo and listCommands error tests, consider adding a test that {"aggregate": "test", "pipeline": [{"$ping": {}}], "cursor": {}} returns UNKNOWN_PIPELINE_STAGE_ERROR.
This PR adds the tests for the $ping operator, following the format of other diagnostic tests
Ref: Issue #43, #444