Skip to content

Increase coverage for tests that did not set minimum threshold#258

Open
robander wants to merge 5 commits into
oracle:mainfrom
robander:rodaande/update-tests
Open

Increase coverage for tests that did not set minimum threshold#258
robander wants to merge 5 commits into
oracle:mainfrom
robander:rodaande/update-tests

Conversation

@robander
Copy link
Copy Markdown
Member

@robander robander commented May 15, 2026

Description

No code change; this only adds tests that verify existing MCP server code.

These four servers were picked out by Codex as not setting up any minimum bar for passing tests, along with the following comments that caused concern:

oci-database-mcp-server: largest surface by far: 147 tools, ~22k source LOC, one unit test file. Tests mostly prove happy-path tool invocation/client forwarding, with almost no negative/error-branch coverage.

oci-recovery-mcp-server: complex orchestration but thin tests: 19 tools, 21 tests, and 5 tool functions appear untested: summarize_protected_database_backup_destination, list_db_homes, get_db_home, list_db_systems, get_db_system. It also has pagination, enrichment, metrics, and multi-client correlation.

oci-support-mcp-server: small tool count, but wide signatures and pagination/filter logic. Current unit tests are compact happy paths; list_incidents especially needs pagination, limit handling, retry strategy, and optional filter forwarding tests.

oci-limits-mcp-server: only 6 unit tests for 5 tools, no negative-path coverage, and the redirect shim provide_availability_domains_for_limits appears untested. It needs tests for redirect shape, unsupported availability, AD-scope behavior, pagination helper forwarding, and the intentional get_identity_client failure.

Coverage levels by lines-of-code were previously at:

  • database: 79%
  • recovery: 52%
  • support: 58%
  • limits: 86%

This PR adds codex-generated test cases to each of the four to get over 90%, with a focus on useful or important tests.

PR updated to also reach the 90% coverage bar for oci-pricing-mcp-server, which did not have a minimum set and reported only 63% coverage. With this update, all of the src/oci-* servers pass tests with minimum 90% coverage.

Fixes # (issue)

Type of change

New tests, no functional change

How Has This Been Tested?

Adds new tests, those tests and old tests continue to run

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 15, 2026
Copy link
Copy Markdown
Member

@gebhardtr gebhardtr left a comment

Choose a reason for hiding this comment

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

👏

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

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants