Test service restart



Beginner with kitchen and inspec suite, I'm more comfortable with the chef API.
I ran into an issue with a community cookbook and have to upgrade it: the service installed by that cookbook is restarted on every chef-client run. I guess the new version correct it but I want to test it before going live.

But I can't find a way to verify if a service did not restart.

I tried:

describe processes("filebeat") do
its('time') { should cmp > Time.local(0)}


describe processes("filebeat") do
its('start') { should cmp < Time.now() - 300).strftime("%-m/%-d/%Y %-l:%M:%S %p")}

But I never get a matching result. Also, i'm not sure it's the best way to do this.

Moreover, with the kitchen test command, the VM is regenerated from scratch without that service installed. It bother me since I can't see how to test cookbook evolution.

Thank you for your answers.