This hands-on lab will test your ability to create an InSpec test and your ability to create a waiver file to exclude a specific control from testing. You will need to show a test failure, then mitigate that test using your waiver file.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Log In to the Provided Server
- Log in to the server as
cloud_user
with the provided password . The server has Chef Workstation installed.
NOTE: Server setup may take several minutes after the lab has started. Once server configuration has been completed, a file named
SERVER-READY
is generated.- Log in to the server as
- Create and Edit a Chef InSpec Test Profile Named folder-check
- Using the appropriate command, create an InSpec test profile named
folder-check
. - Accept necessary licenses.
- Move to the test profile.
- Find the appropriate InSpec test file and edit it to test if the
/tmp2
folder exists. - Run the InSpec test you just created. It should produce an error.
- Using the appropriate command, create an InSpec test profile named
- Create a Waiver File to Exclude /tmp2 from Testing
- Create a waiver file to exclude the test for
/tmp2
. - Run the test again and the error should no longer exist, since the failing control has been excluded.
- Create a waiver file to exclude the test for