test(docker): merge the verify role runs and assert a unit change keeps dockerd running #467

Merged
Defame1297 merged 2 commits from test/460-docker-verify-runs into main 2026-11-28 23:37:01 +00:00
Owner

What and why

Closes #460

roles/docker/molecule/default/verify.yml ran the role four times to switch the boot unit, a daemon setting and the restart input. It now runs it twice, in one play:

  • "Verify the daemon settings" runs first. No earlier play writes daemon.json, so it still reads converge's file.
  • The play reads dockerd's start time, then:
    • Run A: boot unit off, max-concurrent-downloads: 5, restart off. Asserts the unit files are [false, false, true], the value is 5, and the start time has not moved. That last assert is new: a unit or daemon change alone must not restart dockerd. Removing the boot unit only disables it, deletes its files and reloads systemd, and the daemon notify is empty while restart is off.
    • Run B: everything on, max-concurrent-downloads: 6, restart on. Asserts the start time changed, the value is 6, and all three unit files are back.
  • #454's docker_keyring_checksum input and the stand-in key stat are kept once. The refuse_checksum and removal plays are unchanged and start from the same state as before.
Old run Assertion Now
1, boot unit off unit files [false, false, true] A
2, both units on none B asserts all three files (new)
3, value 5, no restart start time unchanged A
4, value 6, restart start time changed, value 6 B

Verified

  • pre-commit run --all-files passes, and ansible-test sanity passed on push.
  • A clean-context review compared old and new assertions and traced the role's notify and handler paths for both runs; nothing blocking.

Not verified

  • The scenario on a container: this PR's Molecule run is the first. Its scenario time goes into a comment here once it finishes.

  • I confirm third-party material is recorded in NOTICE and REUSE.toml, or there is none.

Assisted-by: Claude Code

## What and why Closes #460 `roles/docker/molecule/default/verify.yml` ran the role four times to switch the boot unit, a daemon setting and the restart input. It now runs it twice, in one play: - "Verify the daemon settings" runs first. No earlier play writes daemon.json, so it still reads converge's file. - The play reads dockerd's start time, then: - **Run A:** boot unit off, `max-concurrent-downloads: 5`, restart off. Asserts the unit files are `[false, false, true]`, the value is 5, and the start time has not moved. That last assert is new: a unit or daemon change alone must not restart dockerd. Removing the boot unit only disables it, deletes its files and reloads systemd, and the daemon notify is empty while restart is off. - **Run B:** everything on, `max-concurrent-downloads: 6`, restart on. Asserts the start time changed, the value is 6, and all three unit files are back. - #454's `docker_keyring_checksum` input and the stand-in key stat are kept once. The refuse_checksum and removal plays are unchanged and start from the same state as before. | Old run | Assertion | Now | |---|---|---| | 1, boot unit off | unit files `[false, false, true]` | A | | 2, both units on | none | B asserts all three files (new) | | 3, value 5, no restart | start time unchanged | A | | 4, value 6, restart | start time changed, value 6 | B | ## Verified - `pre-commit run --all-files` passes, and `ansible-test sanity` passed on push. - A clean-context review compared old and new assertions and traced the role's notify and handler paths for both runs; nothing blocking. ## Not verified - The scenario on a container: this PR's Molecule run is the first. Its scenario time goes into a comment here once it finishes. --- - [x] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. Assisted-by: Claude Code
Claude added this to the CI velocity (emergency) milestone 2026-11-28 21:37:32 +00:00
Claude added 1 commit 2026-11-28 21:37:33 +00:00
test(docker): merge the verify role runs and assert a unit change keeps dockerd running
Build / build (pull_request) Successful in 34s
Lint / lint (pull_request) Successful in 3m36s
Molecule / molecule (pull_request) Successful in 7m0s
be8c3f2ed9
The verify ran the role four times to switch the unit, daemon and restart
inputs, and each run refreshed apt against the stand-in repository. Nothing
showed that removing a unit leaves dockerd running.

The daemon-settings check now runs before any role run; those runs set no
daemon input until the last play, so daemon.json still holds converge's
content. One play then runs the role twice: first with the boot unit off, a
daemon change and no restart, asserting the units, the new value and an
unchanged dockerd start time; then with both units on and a restart,
asserting the boot unit is back, the value and a new start time.

Closes #460

Assisted-by: Claude Code
Author
Owner

Measured: the Molecule job passed. docker/default took 361 s, running alongside gitea_runner/default, which the change also selects. Task rounds in the scenario went from 455 to 388 (−15%), against the log of run 6363 on main before this change. For reference, the scenario took 643 s in a 4-lane full run and 352 s in a 2-lane one; seconds vary a lot with the runner's load.

Assisted-by: Claude Code

Measured: the Molecule job passed. `docker/default` took 361 s, running alongside `gitea_runner/default`, which the change also selects. Task rounds in the scenario went from 455 to 388 (−15%), against the log of run 6363 on `main` before this change. For reference, the scenario took 643 s in a 4-lane full run and 352 s in a 2-lane one; seconds vary a lot with the runner's load. Assisted-by: Claude Code
Defame1297 added 1 commit 2026-11-28 23:28:12 +00:00
Merge branch 'main' into test/460-docker-verify-runs
Build / build (pull_request) Successful in 42s
Lint / lint (pull_request) Successful in 4m41s
Molecule / molecule (pull_request) Successful in 8m7s
876ff2ada5
Defame1297 scheduled this pull request to auto merge when all checks succeed 2026-11-28 23:28:39 +00:00
Defame1297 merged commit ca62d4aaa8 into main 2026-11-28 23:37:01 +00:00
Defame1297 deleted branch test/460-docker-verify-runs 2026-11-28 23:37:11 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#467