# PR#70: The Deploy Test Runs the Bundle's Own Launcher > **WARNING:** This document describes only the change applied in this PR. > It may already be outdated once the next PR is merged. > Historic PR documentation is not maintained along with new PRs; treat it as a snapshot. ## Related Links - [werkregie PR#69](https://git.javagil.de/mi/werkregie/pulls/69): Werkator deploys a green main to mih09; merged with werkrevisor's ORANGE finding "Launcher version handling untested" still open. ## Problem The receiver of PR#69 asks the new launcher for its version with `bin/werkregie-dashboard version`. Its tests used launcher stubs only, so no test showed that the bundle's own launcher answers this command. A launcher that ignores its argument would start the dashboard in the mode `local` and never end, so the deploy would hang. ## Non-Goals - No change to what the deploy does when the launcher answers. ## Specification ### Feature: the receiver checks the bundle's own launcher #### Scenario#70.01: the bundle's own launcher prints its version … so that a green main is deployed and not refused by the launcher check. - **Given** a bundle with the launcher of `src/bundle/bin` - **When** the receiver installs it - **Then** the launcher prints the version of `Main`, and the service runs with it ##### Verified by - [DeployReceiveTest: a bundle replaces the runtime and the service answers with its version](../../dashboard/src/test/kotlin/de/hoennig/werkregie/dashboard/DeployReceiveTest.kt) #### Scenario#70.02: a launcher that prints no version leaves the service running … so that a broken launcher costs no downtime. - **Given** a bundle whose launcher prints no version, or does not end within 60 s - **When** the receiver checks it - **Then** the service keeps running unchanged, and the build `deploy` fails ##### Verified by - [DeployReceiveTest: a bundle whose launcher prints no version leaves the service untouched](../../dashboard/src/test/kotlin/de/hoennig/werkregie/dashboard/DeployReceiveTest.kt) - [DeployReceiveTest: a bundle whose launcher does not end leaves the service untouched](../../dashboard/src/test/kotlin/de/hoennig/werkregie/dashboard/DeployReceiveTest.kt) ## Solution - The bundle of the successful deploy in `DeployReceiveTest` has the real launcher of `src/bundle/bin` and runs the real `Main`, with the test's JVM and classpath in place of the jlinked JRE and the jars. Without `"$@"` in the launcher, this test fails. - New tests give a launcher that prints no version and one that does not end. - The receiver gives the launcher 60 s, `WERKREGIE_LAUNCHER_SECONDS`; the test of the launcher that does not end sets 2 s. - The test isolates a dashboard that a broken launcher starts by mistake: its configuration names a `stateDir` of its own, since the JVM takes `user.home` from passwd and not from `HOME`. Before that, a red run of the test wrote to the journal of the user on think for some minutes. - The README names the two failures instead of "both cases". - Version 0.43.2; PR#71 took 0.43.1 first. ## Open Questions None. ## Additional Changes - `werkregie-deploy` calls `ssh -T`: the first deploy, 0.43.1 by `main@deploy`, logged "Pseudo-terminal will not be allocated". That deploy installed 0.43.1 and reported it running, so the plan sets `#ops.deploy` to `[^]`.