test(inspec): replace serverspec with inspec tests
This commit is contained in:
7
test/integration/default/controls/command_spec.rb
Normal file
7
test/integration/default/controls/command_spec.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
control 'Postgres command' do
|
||||
title 'should match desired lines'
|
||||
|
||||
describe command(%q{su - postgres -c 'psql -qtc "\l+ db2"'}) do
|
||||
its(:stdout) { should match(/db2.*remoteUser.*UTF8.*en_US\.UTF-8.*en_US\.UTF-8.*my_space/) }
|
||||
end
|
||||
end
|
||||
10
test/integration/default/controls/config_spec.rb
Normal file
10
test/integration/default/controls/config_spec.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
control 'Postgres configuration' do
|
||||
title 'should include the directory'
|
||||
|
||||
describe file('/srv/my_tablespace') do
|
||||
it { should be_directory }
|
||||
it { should be_owned_by 'postgres' }
|
||||
it { should be_grouped_into 'postgres' }
|
||||
its('mode') { should cmp '0700' }
|
||||
end
|
||||
end
|
||||
13
test/integration/default/controls/services_spec.rb
Normal file
13
test/integration/default/controls/services_spec.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
control 'Postgres service' do
|
||||
impact 0.5
|
||||
title 'should be running and enabled'
|
||||
|
||||
describe service('postgresql') do
|
||||
it { should be_enabled }
|
||||
it { should be_running }
|
||||
end
|
||||
|
||||
describe port(5432) do
|
||||
it { should be_listening }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user