Skip to content

upload-codescene-coverage: verify check-mode CLI call count #402

Description

@coderabbitai

Summary

Add a CLI call-count contract to the check-mode tests for .github/actions/upload-codescene-coverage.

The current test verifies the stub output for one invocation of:

check --verbose --coverage-files coverage.xml

It does not fail if the action invokes the CLI more than once.

Required change

Use cmd_mox.verify(), or an equivalent strict mock verification, to assert that the expected CodeScene CLI command executes exactly once.

Rationale

A duplicate coverage check can alter runtime, duplicate diagnostics, or cause unexpected side effects. The current stdout assertion cannot detect this regression.

Affected area

  • .github/actions/upload-codescene-coverage/tests/test_check_mode.py

Acceptance criteria

  • The successful check-mode test asserts exactly one CLI invocation.
  • The assertion verifies the expected arguments, including --verbose and --coverage-files coverage.xml.
  • A deliberate duplicate invocation causes the test to fail.

References

Metadata

Metadata

Assignees

Labels

mediumRoadmap items to schedule within the current quarter. Clear scope, normal review cycles.testingTest coverage, test infrastructure, and verification tooling work.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions