ansible-role-swarm/test/integration/default/serverspec/default_spec.rb

27 lines
600 B
Ruby
Raw Normal View History

2018-12-22 13:55:51 +00:00
require 'serverspec'
set :backend, :exec
puts
puts '================================'
puts %x(ansible --version)
puts '================================'
describe package('docker-ce') do
it { should be_installed }
2018-12-22 13:55:51 +00:00
end
describe file('/etc/docker/compose/test/docker-compose.yml') do
it { should exist }
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_mode 640 }
it { should contain '/bin/sleep infinity' }
end
describe command('docker ps') do
its(:exit_status) { should eq 0 }
its(:stdout) { should match 'alpine' }
end