32 lines
621 B
Ruby
32 lines
621 B
Ruby
|
require 'serverspec'
|
||
|
|
||
|
set :backend, :exec
|
||
|
|
||
|
puts
|
||
|
puts '================================'
|
||
|
puts %x(ansible --version)
|
||
|
puts '================================'
|
||
|
|
||
|
sleep 10
|
||
|
|
||
|
describe package('default-jre') do
|
||
|
it { should be_installed }
|
||
|
end
|
||
|
|
||
|
describe file('/etc/cerebro/cerebro.conf') do
|
||
|
it { should be_file }
|
||
|
it { should be_mode 640 }
|
||
|
it { should be_owned_by 'root' }
|
||
|
it { should be_grouped_into 'cerebro' }
|
||
|
it { should contain 'http.port = 9000' }
|
||
|
end
|
||
|
|
||
|
describe service('cerebro') do
|
||
|
it { should be_enabled }
|
||
|
it { should be_running.under('systemd') }
|
||
|
end
|
||
|
|
||
|
describe port(9000) do
|
||
|
it { should be_listening }
|
||
|
end
|