oscerd commented on PR #26677:
URL: https://github.com/apache/camel/pull/26677#issuecomment-5828784352

   Fixed in `413df4f4` — rebased onto current `main` and took your option (1).
   
   **Reproduced it first.** Cherry-picking the four commits onto current `main` 
brought `OpaWasmModeValidationTest` into the branch and the failure came with 
it, exactly as you said a rebase alone would do:
   
   ```
   Tests run: 2, Failures: 0, Errors: 2 -- OpaWasmModeValidationTest
   FailedToStartRouteException: Failed to start route: route2 because:
   java.io.FileNotFoundException: Cannot find resource: classpath:authz.wasm
   ```
   
   `registersTheCheckForTheRestRouteButNotTheWasmRoute` and 
`acceptsFailOpenInWasmMode` now live in `OpaWasmIT`, and 
`OpaWasmModeValidationTest` is deleted.
   
   **One wrinkle your sketch didn't have:** `OpaWasmIT` has no 
`createRouteBuilder()` — it drives producers through `template.request(uri, 
...)` with explicit URIs, so there were no `from(...)` routes at all. The 
health-check test needs both routes actually started, so I added a route 
builder carrying the rest/wasm pair, with a comment recording why the tests 
moved.
   
   **I did not trust the green.** A relocated test that quietly stopped 
discriminating looks identical to a healthy one, and this is CAMEL-24743's only 
guard. So I disabled the wasm-mode skip in `OpaProducer` — the exact regression 
it exists to catch — and it fails alone:
   
   ```
   OpaWasmIT.registersTheCheckForTheRestRouteButNotTheWasmRoute
   Expected size: 1 but was: 2 in:
   [OpaProducerHealthCheck@da40da8c, OpaProducerHealthCheck@fae4fb5d]
   ```
   
   So the coverage moved with the test rather than evaporating into a class 
where a second wasm endpoint could have masked it.
   
   79 unit tests and 12 ITs green (`OpaWasmIT` was 10).
   
   **On the cost you named:** agreed, and worth stating plainly for the record 
— these two no longer run in a plain build. With the committed fixtures gone 
there is no bundle to start a wasm route from without Docker, so option (2) has 
nothing to point at. I did not find a third way: `OpaWasmEvaluator.loadPolicy` 
needs a module with the OPA ABI exports, and there is nothing to synthesise 
in-test.
   
   **#26670** carries the same collision (`OpaSecurityPolicyWasmTest`, 
`classpath:authz.wasm` at line 47). Whichever of the two lands second gets this 
same treatment, and I will do it then rather than guess the order now.
   
   _Claude Code on behalf of @oscerd_
   


-- 
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]

Reply via email to