describe package('runit') do
  it { should be_installed }
end

describe command('ps -ef | grep -v grep | grep "runsvdir"') do
  its(:exit_status) { should eq 0 }
  its(:stdout) { should match(/runsvdir/) }
end

describe file('/etc/service') do
  it { should be_directory }
  its('mode') { should cmp '0755' }
  it { should be_owned_by 'root' }
  it { should be_grouped_into 'root' }
end

if os[:family] == 'debian' && os[:release].to_i == 9
  describe package('runit-systemd') do
    it { should be_installed }
  end
end

describe package('runit') do
  it { should be_installed }
end

describe processes('runsvdir') do
  it { should exist }
end

describe file('/etc/service') do
  it { should be_directory }
  its('mode') { should cmp '0755' }
  it { should be_owned_by 'root' }
  it { should be_grouped_into 'root' }
end

Add a test for runit-systemd and use the process inspec resource
Add a test for runit-systemd and use the process inspec resource

Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
