Reputation: 179
I try to run simple test using Chef test kitchen:
describe file('/opt/test_file.txt') do
it { should exist }
end
I can easy run this test on my kitchen machine (virtualBox/centos-7.2) using kitchen verify.
How can I run this test inside a Docker container installed in my kitchen machine?
Upvotes: 0
Views: 1171
Reputation: 488
In general would try to handle docker container spec tests as part of the image building process, however, I guess you could run something like this:
describe bash('docker exec -it YOUR_CONTAINER test -f /opt/test_file.txt') do
its('exit_status') { should eq 0 }
end
Upvotes: 1