Skip to content

test(marketplace): cover registered ref install flow#1994

Open
abhinavgautam01 wants to merge 1 commit into
microsoft:mainfrom
abhinavgautam01:test-1918-marketplace-ref-e2e
Open

test(marketplace): cover registered ref install flow#1994
abhinavgautam01 wants to merge 1 commit into
microsoft:mainfrom
abhinavgautam01:test-1918-marketplace-ref-e2e

Conversation

@abhinavgautam01

Copy link
Copy Markdown
Contributor

Description

Adds integration-tier coverage for marketplace registered --ref propagation through the full install path.

This covers the follow-up from #1918 by exercising apm install plugin@marketplace through marketplace resolution, dependency parsing, manifest persistence, lockfile writing and the downloader boundary. The test verifies both GitHub-family and GitLab marketplace flows, including the structured GitLab git + path dependency shape.

Fixes #1918

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Validation run:

uv run --extra dev ruff format --check src/ tests/
uv run --extra dev ruff check tests/integration/test_marketplace_ref_install_e2e.py
uv run --extra dev pytest tests/integration/test_marketplace_ref_install_e2e.py tests/unit/marketplace/
test_marketplace_resolver.py::TestMarketplaceRegisteredRefPropagation -q
git diff --check

Results:

  • Ruff format check passed
  • Ruff lint passed
  • Focused pytest passed: 9 passed
  • Diff check passed

Spec conformance (OpenAPM v0.1)

If this PR changes behaviour that an OpenAPM v0.1 req-XXX covers,
confirm the three-step ritual (see CONTRIBUTING.md "Adding or
changing a normative requirement"):

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
    (new/changed anchor + prose + Appendix C
    row).

  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml
    updated.

  • Test edit: a @pytest.mark.req("req-XXX") test under
    tests/spec_conformance/ added or extended.

  • CONFORMANCE.{md,json} regenerated via
    uv run --extra dev python -m tests.spec_conformance.gen_statement
    and committed.

  • N/A -- this PR does not change OpenAPM-observable behaviour.

Copilot AI review requested due to automatic review settings July 2, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new integration-tier test that exercises the end-to-end apm install <plugin>@<marketplace> flow to ensure a registered marketplace --ref is propagated all the way through resolution, persistence (apm.yml / lockfile), and into the downloader boundary for both GitHub-family and GitLab marketplaces.

Changes:

  • Introduces a hermetic integration test that stubs only external I/O seams (marketplace fetch/cache, existence probe, downloader) while running the rest of the install pipeline on production code.
  • Verifies --ref propagation for both dependency persistence formats:
    • GitHub-family string dependency form
    • GitLab structured {git, path, ref} dependency form
  • Asserts clone URL components via urllib.parse.urlparse (component-level checks rather than substring assertions).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(marketplace): add integration-tier coverage for marketplace --ref end-to-end flow

2 participants