Document cleaning up fixtures after a successful beaker run - #436
Conversation
dd269df to
af7e484
Compare
|
@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 |
|
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>
af7e484 to
cd2e03d
Compare
Summary
rake beakerrun:fixtures:prephas a matchingfixtures:cleantask, but nothing invokes it automatically, so show enhancing thebeakertask with a post-actionRSpec::Core::RakeTasksignals failure viaexitrather than a raised exception, which skips theenhanceblock), leaving fixtures in place for debuggingFollow-up to #433/#435, from a live question in Vox Pupuli Slack (Hugo Haakseth, after applying the
fixtures:prepfix from #435).Test plan
bundle exec rake rubocopmarkdownlint-cli2on the changed filebundle exec jekyll buildfixtures:prepruns first,fixtures:cleanruns after a passing run, and is skipped after a failing run