# # encoding: utf-8

# Inspec test for recipe irrigate-syslog::default

# The Inspec reference, with examples and extensive documentation, can be
# found at http://inspec.io/docs/reference/resources/

# This is a service test, checks if rsyslogd is installed, enabled, and running.
describe systemd_service('syslog-ng') do
  it { should be_installed }
  it { should be_enabled }
  it { should be_running }
end

describe file('/etc/syslog-ng/syslog-ng.conf') do
  it { should exist }
end
# This is an port test, checks if instance is listening  on port 514.
describe port(514) do
  it { should be_listening }
  its('protocols') { should include 'tcp' }
  its('protocols') { should include 'udp' }
end
