Harden and repair the acceptance suite - #172
Open
hcaballero2 wants to merge 2 commits into
Open
Conversation
- 00_default_spec.rb: add a noop convergence check (catch_changes + noop)
after idempotency in both the bare-include and full-config contexts, to
catch resources that report spurious pending changes under noop.
- 05_schedule_spec.rb: repair the schedule suite. ~23 assertions were
written as `expect { X.to eq Y }` -- a block passed to expect with no
matcher chained, which always passes silently and asserts nothing; they
are now `expect(X).to eq Y`. Three crontab checks additionally had a
`.strip to eq` typo (missing `).to`) and are corrected. Pin
aide::minute => 22 in the root/etc contexts so the hardcoded
'22 4 * * 0' crontab expectations and the sed-based drift test are
deterministic (the module default is fqdn_rand(59)).
- Relax the puppet_aide.timer enable assertions in cron modes: assert only
the deterministic guarantee (`ensure => stopped`), since systemd::timer
does not reliably disable an already-enabled timer (stopped-but-enabled,
no drift). Tracked for a proper module-side fix in #169.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 7, 2026
The root/etc "does not have puppet_aide.service loaded" examples asserted `enable => 'false'`, but the oneshot unit -- like the timer -- has no [Install] section, so it is static: `systemctl disable` is a no-op on a static unit and Puppet's systemd provider always reports `enable => 'true'` (is-enabled exits 0). The assertion can never pass regardless of module code, which is the AlmaLinux 9/10 acceptance failure. Relax both service examples to the deterministic guarantee (`ensure => 'stopped'`), matching the timer examples, and correct the root-mode timer NOTE which mis-described the unit as an "already-enabled timer" rather than static. The module-side fix (give the timer an [Install] section so `enable` becomes enforceable) is tracked in #169. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Acceptance-suite hardening, split out of the original combined PR #168 per review feedback.
00_default_spec.rb: add a noop convergence check (catch_changes+noop) after idempotency in both the bare-include and full-config contexts, to catch resources that report spurious pending changes under noop.05_schedule_spec.rb: repair the schedule suite. ~23 assertions were written asexpect { X.to eq Y }(a block passed toexpectwith no matcher chained — always passes silently and asserts nothing); they are nowexpect(X).to eq Y. Three crontab checks additionally had a.strip to eqtypo (missing).to) and are corrected. Pinaide::minute => 22in the root/etc contexts so the hardcoded'22 4 * * 0'crontab expectations and the sed-based drift test are deterministic (the module default isfqdn_rand(59)).puppet_aide.timerandpuppet_aide.serviceenable assertions in cron modes: assert only the deterministic guarantee (ensure => stopped). Both units ship no[Install]section, so they are static —systemctl disableis a no-op on a static unit and Puppet's systemd provider always reportsenable => 'true'(is-enabledexits 0), so theenable => 'false'assertions can never pass regardless of module code (this is the AlmaLinux 9/10 acceptance failure). The module-side fix (give the timer an[Install]section soenablebecomes enforceable) is tracked in Switching aide scheduling from systemd to cron stops but does not disable puppet_aide.timer #169.Branches off
master; independent of the AGENTS.md and rspec PRs (linked below).Related PRs (split from #168)
🤖 Generated with Claude Code