InterviewSolution
Saved Bookmarks
| 1. |
Write and explain a simple InSpec test? |
|
Answer» InSpec is an in-built testing framework for testing and auditing infrastructure in Chef. A sample InSpec test to verify whether “Nginx” server is INSTALLED and running in a system could be written as follows: ```control 'Nginx-install-1.0' do title 'Check if nginx is installed' describe package 'nginx' do it { should be_installed } end end control 'Nginx should be running' do describe service 'nginx' do it { should be_running } end end```Main components of InSpec tests are:
|
|