control 'splunk' do
  describe package('splunkforwarder') do
    it { should be_installed }
  end

  describe user('splunk') do
    it { should exist }
    its('group') { should eq 'splunk' }
    its('home') { should eq '/opt/splunkforwarder' }
  end

  describe group('splunk') do
    it { should exist }
  end

  describe directory('/opt/splunkforwarder') do
    it { should exist }
    its('owner') { should eq 'splunk' }
    its('group') { should eq 'splunk' }
  end

  describe service('splunk-agent') do
    it { should be_installed }
    it { should be_enabled }
    it { should be_running }
  end
end
