Skip to content

Commit

Permalink
added more checks
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-robertson committed May 31, 2024
1 parent 7b50fbf commit 5ef7a8c
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion spec/acceptance/observium_install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,35 @@

describe file("/opt/observium/config.php") do
it { is_expected.to be_file }
# its(:content) { is_expected.to match %r{key = default value} }
its(:content) { should contain '$config[\'install_dir\'] = "/opt/observium"' }
its(:content) { should contain '$config[\'db_host\'] = \'localhost\';' }
end

describe port(80) do
it { is_expected.to be_listening }
end

# Red hat specifc checks
if os[:family] == 'redhat'

descrube service('httpd') do
it { should be_running }
end

descrube service('snmpd') do
it { should be_running }
end

elsif os[:family] == 'ubuntu'

descrube service('apache2') do
it { should be_running }
end

descrube service('snmpd') do
it { should be_running }
end

end

end

0 comments on commit 5ef7a8c

Please sign in to comment.