Repository navigation
test: restore coverage for two paths the consolidation left untested - #4374
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 20, 2026
Merged
Conversation
Cover the outdated command's locked-origin conflict row and its unregistered-alias fallback, and the orphan check's no-modules and unparsable-manifest early returns, with direct tests on real inputs. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 15:18
5 of 10 tasks
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-c1-coverage-restore
branch
November 20, 2026 15:20
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the added marketplace and orphan-detection test coverage.
No open issues 🎉
What changed in this PR
Restores coverage lost during test consolidation (#4137) for marketplace checks and orphan detection, without changing production behavior.
Changes:
- Adds tests for marketplace alias origin conflicts, fetch suppression, and unregistered-alias fallback.
- Adds orphan-check tests for a missing
apm_modules/directory and an unparsable manifest.
| File | Description |
|---|---|
tests/unit/test_outdated_marketplace_detection.py |
Tests origin-conflict reporting without fetching and fallback signaling for unregistered aliases. |
tests/unit/commands/test_helpers_coverage.py |
Tests empty orphan results when modules are absent or the manifest cannot be parsed. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A coverage check after the test consolidation (#4137) found five source lines that no test reached any more. This PR restores coverage for both paths with direct tests on real inputs:
apm outdated: when a marketplace alias now names a different catalog than the lock recorded, the row reportsorigin-conflictand never fetches; an unregistered alias falls back to the git check (src/apm_cli/commands/outdated.py).apm.ymlbut noapm_modules/, and an unparsableapm.ymlnext toapm_modules/, both report no orphans (src/apm_cli/commands/_helpers.py).Owners:
P-OWNmarketplace alias origin (outdated) and the commands helper orphan scan.Issue and approved scope
Issue: Refs #4082
Human scope-approval comment: the #4082 apm-scope:v1 record (duplicate consolidation; restoring coverage a consolidation wave dropped is part of its done-when).
Does this PR complete the issue, or what remains? It closes the coverage follow-up for #4137. A second consolidation train follows separately.
Type of change
Testing
pytest -k "TestCheckOrphanedPackages or TestCheckMarketplaceRefOriginCheck"on both files), and a coverage run confirmsoutdated.pylines 178, 187, 188 and_helpers.pylines 262, 272 are now covered.Changelog
Spec conformance (OpenAPM v0.1)