Debugging Acceptance Tests Using Beaker
If you are writing acceptance tests for your SIMP module and using SIMP tooling, this guide will help you figure out what's going wrong.
Step-by-step guide
Run your acceptance tests. You can use
rake -D acceptance
andrake -D beaker
to see all the variable available for acceptance testing.:$ BEAKER_destroy=onpass rake acceptance # or whatever rake command you need
- SSH into the created vagrant boxes and run the same manifests that beaker did:
Change into the directory containing the generated Vagrantfiles
$ cd .vagrant/beaker_vagrant_files/default.yml
Run vagrant status to find the names of generated VMs
$ vagrant status Current machine states: server running (virtualbox) client running (virtualbox) This environment represents multiple VMs. The VMs are all listed above with their current state. For more information about a specific VM, run `vagrant status NAME`.
As vagrant user, SSH from the host machine into a VM listed in the output of the
vagrant status
command$ vagrant ssh server
On the VM, become root
$ sudo -s
To examine the applied manifests, change to the /tmp directory
# cd /tmp
Find the manifests and apply them manually with
puppet apply
# ls apply_manifest.pp.yo1P5i # puppet apply apply_manifest.pp.yo1P5i
When you are done debugging, exit out of your SSH session and destroy the VMs
# exit $ exit $ vagrant destroy
Related articles