Skip to content

Document cleaning up fixtures after a successful beaker run - #436

Open
miharp wants to merge 1 commit into
OpenVoxProject:masterfrom
miharp:docs/beaker-fixtures-clean
Open

Document cleaning up fixtures after a successful beaker run#436
miharp wants to merge 1 commit into
OpenVoxProject:masterfrom
miharp:docs/beaker-fixtures-clean

Conversation

@miharp

@miharp miharp commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document cleaning up fixtures after a successful rake beaker run: fixtures:prep has a matching fixtures:clean task, but nothing invokes it automatically, so show enhancing the beaker task with a post-action
  • Note that cleanup is skipped when the acceptance tests fail (verified locally — RSpec::Core::RakeTask signals failure via exit rather than a raised exception, which skips the enhance block), leaving fixtures in place for debugging

Follow-up to #433/#435, from a live question in Vox Pupuli Slack (Hugo Haakseth, after applying the fixtures:prep fix from #435).

Test plan

  • bundle exec rake rubocop
  • markdownlint-cli2 on the changed file
  • bundle exec jekyll build
  • Reproduced the documented Rake snippet standalone (rspec-core + rake, no full module) to confirm: fixtures:prep runs first, fixtures:clean runs after a passing run, and is skipped after a failing run

@miharp
miharp requested a review from a team as a code owner August 4, 2026 11:01
@miharp
miharp force-pushed the docs/beaker-fixtures-clean branch 3 times, most recently from dd269df to af7e484 Compare August 10, 2026 11:54
@h-haaks

h-haaks commented Aug 13, 2026

Copy link
Copy Markdown

@miharp to use fixtures:prep and fixtures:clean with https://github.com/voxpupuli/gha-puppet/blob/v4/.github/workflows/beaker.yml the Gemfile has to be modified to load the openvox gem for system_tests group as well.

I created voxpupuli/modulesync_config#1048

with this modules under modulesync could just use this in .sync.yml

Gemfile:
  acceptance_uses_fixtures: true
Rakefile:
  acceptance_uses_fixtures: true

@miharp

miharp commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

This PR only covers fixtures:clean. I have a follow-up for the same page that documents the Gemfile side: forge_modules: fixtures shell out to puppet module install, so the openvox gem has to be in the system_tests group too. Holding it until this merges so the two don't conflict on the same lines. Once modulesync_config#1048 lands I'll have the follow-up point modulesync-managed modules at acceptance_uses_fixtures: true instead of manual Gemfile edits.

fixtures:prep has a matching fixtures:clean task, but nothing invokes
it automatically. Show enhancing the beaker task with a post-action,
noting cleanup is skipped on failure so fixtures stay in place for
debugging. Verified locally: RSpec::Core::RakeTask signals failure via
exit rather than a raised exception, which skips the enhance block and
leaves fixtures in place, matching puppetlabs_spec_helper's spec_clean
"if successful" behavior.

Follow-up to OpenVoxProject#433 per a Vox Pupuli Slack question from Hugo Haakseth.

Signed-off-by: Michael Harp <mike@mikeharp.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@miharp
miharp force-pushed the docs/beaker-fixtures-clean branch from af7e484 to cd2e03d Compare August 15, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants