Test Kitchen - Reboot Before Running Test Suite?


#1

Hi there, I have an issue where a number of my recipes require a reboot to take hold on the system and my test suite when running kitchen test fails because it runs before the VM has rebooted.

Is there a way to reboot the VM before kitchen test runs my serverspec suite?

Thanks!


#2

We just released Test-Kitchen 1.10.0 which, with Chef 12.11, can be used to handle reboots during provisioning. You can include a reboot resource in a recipe in your run list and you’ll get a reboot and re-converge before moving on to the test phase.


#3

Thanks, I’ll update and give it a spin!


#4

I’ve used this reboot handling in Test Kitchen for Win2008R2 and it worked great - thanks!