Commit graph

3 commits

Author SHA1 Message Date
Nicolas De Loof
34cae9461c test(e2e): lock pre_start's streamed output and tighten the foreground up scenarios
A foreground up does stream a pre_start hook's output into the session since
the hook's log stream is opened once it is started. The hook scenario had
stopped asserting it on the belief it never did; its fixture only wrote to a
file, so nothing could reach stdout. The pre_start now also prints a marker
the service never logs, asserted on stdout, and the scenario states a single
intent covering both hooks.

Also tighten the scenarios after review:
- assert a container's printed output on stdout rather than on the whole
  output, and add the state or negative checks that were missing
  (ContainerEnv after a recreation, web exited once its dependency was
  healthy, no output of the replaced container);
- the dependency timeout scenario carries the "deadline exceeded" guard of
  its detached counterpart, with a fixture aligned on it;
- drop the abort message and the useless wait from the immediate-exit
  scenario: up only returns once the application is stopped;
- rename the dry-run scenario after the others, minimize its fixture and stop
  coupling it to the dry-run end-of-output wording;
- explain the sleeps of the fixtures, and give the hook one a larger margin;
- build tag e2e only: nothing here is Unix-specific.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-26 10:52:50 +01:00
Nicolas De Loof
0dd199257f test(e2e): stop asserting pre_start output the foreground up never streams
The hook scenario matched "pre-start-hook-ran" in the output, but the
service's own line "app-read:pre-start-hook-ran" contains it, so the
assertion passed without any pre_start output reaching the session. A
foreground up streams post_start's output but not pre_start's today
(checked on main too). Lock what actually holds: pre_start's effect, read
by the service through a value distinct from anything it logs.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-26 10:52:50 +01:00
Nicolas De Loof
07306856b4 test(e2e): lock the behavior of the foreground up
Most e2e coverage of the start phase runs detached; the foreground
`up`, whose create and start phases are driven by separate code paths,
had none for hooks, health-gated dependencies, a container that exits as
soon as it starts, restarts of exited containers, recreation, dependency
timeouts or dry-run. Add scenarios that fix these observables before the
machinery behind it changes.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-26 10:52:50 +01:00