ammachado opened a new pull request, #24666: URL: https://github.com/apache/camel/pull/24666
# Description `camel-openapi-rest-dsl-generator`'s tests (e.g. `RestDslGeneratorV3Test`, `RestDslGeneratorV2Test`, and the XML/YAML variants) generate source into a string that uses `\n` line endings, then compare it byte-for-byte against `.txt` fixtures read as raw UTF-8 bytes: ```java final String expectedContent = new String(Files.readAllBytes(Paths.get(file)), StandardCharsets.UTF_8); assertThat(code.toString()).isEqualTo(expectedContent); ``` There is no `.gitattributes` rule pinning these fixtures, so on a Windows checkout (`core.autocrlf=true`) they are converted to CRLF. The generated string still uses `\n`, so the equality assertions fail with visually identical `expected:`/`but was:` output. This is a latent main-branch bug; it was surfaced by the new `camel-launcher` Windows CI job added under CAMEL-23703, which is the first CI to run this module's tests on Windows. Fix: add a module `.gitattributes` pinning `*.txt` to `text eol=lf` so the fixtures always check out with LF regardless of platform. The fixtures are already stored as LF in the index, so no renormalization is needed. Verified locally with `git ls-files --eol` (fixtures now resolve to `attr/text eol=lf`). # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-24053) filed for the change (usually before you start working on it). # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [ ] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. _This is a `.gitattributes`-only change with no code or generated output. It was verified with `git check-attr` / `git ls-files --eol`; the definitive proof is the Windows CI runner checking out the fixtures as LF._ # AI-assisted contributions - [x] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used. --- _Claude Code (Opus 4.8) on behalf of ammachado_ -- 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]
