Hi I have a .kitchen.yml
file as the below and it is using Policyfile_zero as the provision.
Now I want to use Inspec
to do the kitchen verify
on the VM created using kitchen create
(via Vagrant).
I run the kitchen verify
but the verify rules are not running. However the kitchen converge
is running successfully.
To make Inspec working under Policyfile provisioner in test kitchen, How to do that?
---
driver:
name: vagrant
provisioner:
name: policyfile_zero
platforms:
- name: centos/7
suites:
- name: local_test
data_bags_path: "test/data_bags"
provisioner:
policyfile: local_test.rb
verifier:
inspec_tests:
- test/smoke/default
Here are the test rules (test/smoke/default/default_test.rb):
describe user('gituser') do
it { should exist }
its('uid') { should eq 2001 }
its('gid') { should eq 2001 }
its('group') { should eq 'gituser' }
its('home') { should eq '/home/gituser' }
its('shell') { should eq '/bin/bash' }
end