jvrubel opened a new pull request, #28526:
URL: https://github.com/apache/camel/pull/28526

   ## What
   
     Several `camel-jbang-it` integration tests were tagged 
`@Tag("container-only")` preventing
     them from running in the dockerless (`local-camel-cli-process`) mode 
introduced for Windows CI.
     This PR removes that gate from tests that have no real container 
dependency, and extracts two
     tests out of container-only classes into standalone classes so they can 
run everywhere.
   
     It also fixes two bugs in `CliLocalProcessService` that were blocking the 
tests from working
     correctly in local mode.
   
     ## Changes
   
     ### Infrastructure (`camel-test-infra-cli`)
   
     - **`CliService`**: added `getCommandWorkDir()` default method returning 
`/home/jbang`.
       This abstracts the directory from which `camel` commands execute 
(container home directory
       vs. host working directory) so test code no longer needs to hard-code 
`/home/jbang`.
   
     - **`CliLocalProcessService`**: overrides `getCommandWorkDir()` to return 
the host `workDir`.
       Also fixes `copyFileInternally` to apply `cp`-style semantics: when the 
destination is an
       existing directory, the source filename is appended — matching the 
behaviour of the
       `docker exec cp` used in container mode.
   
     - **`CliServiceFactory.SingletonCliService`**: added missing delegation 
for `getCommandWorkDir()`
       (the proxy class forwards every explicit `CliService` method, but new 
default methods must be
       explicitly overridden to reach the wrapped implementation rather than 
the interface default).
   
     ### Test support (`JBangTestSupport`)
   
     - `downloadFile()` and `generateProperties()` now use 
`containerService.getCommandWorkDir()`
       instead of the hard-coded `/home/jbang`, so downloaded/generated files 
land in the correct
       working directory in both modes.
     - `afterEach` cleanup generalised from `find /home/jbang …` to
       `find <getCommandWorkDir()> …` for the same reason.
   
     ### Tests de-containerised
   
     | Class / method | Change |
     |---|---|
     | `CamelDebugITCase` | Removed `@Tag("container-only")` from class — test 
only checks a log line; 
     `executeNohup` already has a local-process override |
     | `DevModeITCase#runUsingProfileTest` | Removed tag; replaced 
`DEFAULT_ROUTE_FOLDER` with 
     `getCommandWorkDir()` for the profile-properties copy |
     | `JolokiaITCase` | Removed `@Tag("container-only")` from class — `curl 
localhost` and `kill <pid>` 
     work identically on the host |
     | `OpenApiITCase` | Removed `@Tag("container-only")` from class; replaced 
three `DEFAULT_ROUTE_FOLDER` 
     references |
     | `RunCommandITCase#runRoutesFromMultipleFilesUsingWildcardTest` | Removed 
tag; replaced hardcoded 
     `/tmp/one` and `/tmp/two` with `mountPoint()` subdirectories |
     | `RunCommandITCase#runDownloadedFromGithubTest` | Removed tag; adopted 
the `--directory=mountPoint()` 
     pattern already used by its companion test 
`runDownloadedInDirectoryFromGithubTest` |
   
     ### Tests extracted from container-only classes
   
     | New class | Extracted from | Why |
     |---|---|---|
     | `InfrastructureListITCase` | `InfrastructureITCase` | `camel infra list` 
requires no Docker; the rest
     of that class does |
     | `StubITCase` | `RunCommandOnMqttITCase` | `testStub` has no MQTT/broker 
dependency; moved so it runs 
     in all modes |
   
     ### Intentionally not changed
   
     - `CmdStartStopITCase#testCamelWatch` — a background process launched with 
`nohup … &` keeps
       the stdout pipe open in the local-process model, causing 
`executeGenericCommand` to block
       until the 120 s timeout. Needs a redesign of the script to redirect 
output explicitly.
     - `CmdReceiveITCase` — relies on the Docker-internal IP of a Mosquitto 
container
       (`getIpAddr(service.getContainer())`); needs the host-mapped port to be 
used instead.
     - `RunCommandITCase#runFromClipboardTest` — inherently depends on SSH + 
X11 into the container.
   
     🤖 Generated with [Claude Code](https://claude.com/claude-code)
     _Claude Code on behalf of jvrubel_
   
   
   


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