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

35 lines
728 B
Ruby
Raw Normal View History

2019-11-08 21:34:52 +01:00
require 'serverspec'
set :backend, :exec
puts
puts '================================'
puts %x(ansible --version)
puts '================================'
sleep 10
describe package('filebeat') do
it { should be_installed }
end
describe file('/etc/filebeat/filebeat.yml') do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
end
describe service('filebeat') do
it { should be_enabled }
it { should be_running.under('systemd') }
end
describe file('/tmp/filebeat/filebeat') do
it { should be_file }
it { should be_mode 600 }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should contain '@timestamp' }
end