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

Open
Claude wants to merge 1 commits from test/460-docker-verify-runs into main
pull from: test/460-docker-verify-runs
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
All checks were successful
Build / build (pull_request) Successful in 34s
Required
Details
Lint / lint (pull_request) Successful in 3m36s
Required
Details
Molecule / molecule (pull_request) Successful in 7m0s
Required
Details
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin test/460-docker-verify-runs:test/460-docker-verify-runs
git checkout test/460-docker-verify-runs
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Kamino#467