Skip to content

test: add source-side integration test for crawl/parse pipeline - #42

Merged
cloudshiftchris merged 1 commit into
mainfrom
cloudshiftchris/repo-parse-integration-test
May 12, 2026
Merged

test: add source-side integration test for crawl/parse pipeline#42
cloudshiftchris merged 1 commit into
mainfrom
cloudshiftchris/repo-parse-integration-test

Conversation

@cloudshiftchris

Copy link
Copy Markdown
Member

Summary

  • Adds MavenSyncIntegrationTest — a Kotest FunSpec that points a real MavenHttpRepository at a user-supplied source repo and runs everything the engine does (crawl, directory-listing parsing, maven-metadata.xml parsing, target-diff, per-version listArtifactVersionAssets) up to but excluding any upload to the target. The target is faked with an empty in-memory stand-in so every source version appears "missing".
  • The test is gated on MAVEN_SYNC_IT_CONFIG (path to a JSON file using the standard SyncConfig schema, layered over defaults.json via the same Hoplite pipeline as MavenSyncMain); when unset the test is reported as skipped and ./gradlew test does no network IO.
  • Writes a deterministic JSON discovery report to build/reports/maven-sync-it/discovery-report.json (group:artifact → version → asset filenames), asserts ≥1 artifact / ≥1 version / ≥1 asset per version, and supports regression snapshots via MAVEN_SYNC_IT_EXPECTED.
  • README gains an "Integration tests" section with env vars, example config, run command, and the note that target.url is required by the schema but not contacted.

Test plan

  • ./gradlew test — passes, integration test reports SKIPPED.
  • MAVEN_SYNC_IT_CONFIG=<local.json> ./gradlew test --tests '*MavenSyncIntegrationTest*' against a real source repo.
  • Snapshot mode: rerun with MAVEN_SYNC_IT_EXPECTED pointing at a saved report.

🤖 Generated with Claude Code

Drives a real MavenHttpRepository against a user-supplied source repo and
runs crawl, parse, target-diff (against an empty fake target), and
per-version asset listing — everything the engine does up to but excluding
the upload to the target. Writes a deterministic discovery report to
build/reports/maven-sync-it/ and supports snapshot comparison via
MAVEN_SYNC_IT_EXPECTED. Skipped by default when the env var is unset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudshiftchris
cloudshiftchris merged commit 8f93f97 into main May 12, 2026
1 of 2 checks passed
@cloudshiftchris
cloudshiftchris deleted the cloudshiftchris/repo-parse-integration-test branch May 12, 2026 15:38
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.

1 participant