Skip to content

Add admin command tests for getParameter#634

Open
vic-tsang wants to merge 1 commit into
documentdb:mainfrom
vic-tsang:admin/commands/getParameter/tests
Open

Add admin command tests for getParameter#634
vic-tsang wants to merge 1 commit into
documentdb:mainfrom
vic-tsang:admin/commands/getParameter/tests

Conversation

@vic-tsang

Copy link
Copy Markdown
Collaborator

This PR contains:

  • admin command tests for getParameter

Ref:

@vic-tsang vic-tsang requested a review from a team as a code owner June 22, 2026 19:31
Signed-off-by: Victor [C] Tsang <vitsangp@amazon.com>
@vic-tsang vic-tsang force-pushed the admin/commands/getParameter/tests branch from 82a5786 to ed7d83e Compare June 22, 2026 19:34
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort L · Status Needs Review
Confidence: 0.85 (mixed)

Reasoning

component from path globs (test-coverage); effort from diff stats (649+0 LOC, 4 files); LLM: Adds new test coverage for the getParameter admin command, a focused addition to the compatibility test suite.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 22, 2026
@@ -0,0 +1,345 @@
"""Tests for getParameter command core behavior."""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing: What happens when {allParameters: true} and a named parameter are both specified? E.g., {"getParameter": {"allParameters": True}, "logLevel": 1}. In MongoDB this returns all parameters (the named param is ignored). Worth testing to confirm DocumentDB matches.

@@ -0,0 +1,161 @@
"""Tests for getParameter command error cases."""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing: setAt: "" (empty string). "invalid" is tested for BadValue, but empty string is a distinct
boundary — it may pass string type validation but fail value validation differently, or be treated as
"no filter" on some implementations.

@@ -0,0 +1,345 @@
"""Tests for getParameter command core behavior."""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other command test files in this repo include a @pytest.mark.smoke test for the happy path. Consider adding one:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants