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

32 lines
728 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
2019-03-17 21:43:20 +00:00
describe command('docker network list') do
its(:exit_status) { should eq 0 }
its(:stdout) { should match 'workgroup' }
end
2018-12-22 13:55:51 +00:00
describe command('docker ps') do
its(:exit_status) { should eq 0 }
its(:stdout) { should match 'alpine' }
end