Information Technology Reference
In-Depth Information
Verify that the website functions as intended by visiting it at
192.168.33.38
. It should
render as shown in
Figure 16-5
.
Figure 16-5. Your apache site on 192.168.33.38
Test Automation with Serverspec
In the last section, we verified that our cookbook worked by running
kitchen converge
and
verifying that the website worked by checking it manually. Let's automate our website veri-
fication process by writing some tests in Serverspec and running the tests with Test Kitchen.
Write Your First Serverspec Test
By default, Test kitchen will look in the
test/integration
subdirectory for test-related files.
Serverspec looks for its own files a few more directory levels below
test/integration
. First
there needs to be a directory name underneath
test/integration
that matches the
suite name
:
<cookbook_root>
└── test
└── integration
└──
<suite_name>