luigidemasi opened a new issue, #133: URL: https://github.com/apache/camel-kit/issues/133
## Description Replace the GitHub-dependent `GitRepoFetcherTest` fixtures with temporary local Git repositories so the tests run in normal Maven builds and CI. The [current test class](https://github.com/apache/camel-kit/blob/0a7f59c9bf89c0b91b1d08497e14a166eec53482/knowledge/indexer/src/test/java/org/apache/camel/kit/knowledge/indexer/GitRepoFetcherTest.java#L13) has a class-level `@Disabled("Requires network access to GitHub")`. Both tests clone `apache/camel-website`, so ordinary builds skip the direct coverage of cloning and file discovery. This also leaves updates, tag caching and recovery behavior without active regression coverage in that class. This follow-up was identified while reviewing #132. Independent local probes passed with both JGit versions in that PR; the coverage gap predates the dependency update. ## Expected behavior Exercise the real `GitRepoFetcher` and JGit operations against small, deterministic fixtures created under JUnit temporary directories. Use a loopback server when required to preserve real shallow-clone/fetch behavior; JGit's bundled server is available without adding a native `git-daemon` requirement. Avoid mocking the Git operations under test. ## Acceptance criteria - [ ] Remove the class-level disablement and replace the public GitHub repository dependency with temporary local fixtures. - [ ] Preserve clone and file-listing coverage, asserting the expected document contents and matching files; verify a branch clone has depth one. - [ ] Cover an existing clone fetching a new upstream commit and resetting tracked contents, with evidence that the clone was updated rather than silently replaced. - [ ] Cover annotated remote-tag listing without peeled duplicates, tag checkout, reuse of an unchanged tag without remote access, and replacement when the requested tag changes. - [ ] Cover recovery from an incomplete clone, re-cloning after a failed update, failed-clone cleanup/error reporting, and explicit refresh. - [ ] Keep fixtures independent of GitHub, credentials, global Git identity/signing settings, fixed ports, and a native Git daemon. Close repositories and any local server, including on failure. - [ ] Run the tests through the default Maven test lifecycle and the existing Java 17/21/25 CI matrix, with no opt-in profile or network-based skip for these tests. - [ ] Demonstrate that a representative behavior regression makes the corresponding test fail, then restore the implementation and rerun successfully. Validation from the repository root: ```bash ./mvnw -B -pl knowledge/indexer -am clean verify ./mvnw -B -Psourcecheck validate ``` ## Website impact Not required: this is test coverage work with no intended change to public behavior. _AI-generated by Codex on behalf of @luigidemasi._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
