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 acceptanceandrake -D beakerto see all the variable available for acceptance testing.:$ BEAKER_destroy=onpass rake acceptance # or whatever rake command you needSSH 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.ymlRun 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 statuscommand$ vagrant ssh serverOn the VM, become root
$ sudo -sTo examine the applied manifests, change to the /tmp directory
# cd /tmpFind the manifests and apply them manually with
puppet apply# ls apply_manifest.pp.yo1P5i # puppet apply apply_manifest.pp.yo1P5iWhen you are done debugging, exit out of your SSH session and destroy the VMs
# exit $ exit $ vagrant destroy