Allow to specify a tablespace for a database
* Tablespaces have to be created before the databases * Add pillar examples * Add tests
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
require "serverspec"
|
||||
require 'serverspec'
|
||||
|
||||
describe service("postgres") do
|
||||
describe service('postgresql') do
|
||||
it { should be_enabled }
|
||||
it { should be_running }
|
||||
end
|
||||
|
||||
describe port("5432") do
|
||||
describe port('5432') do
|
||||
it { should be_listening }
|
||||
end
|
||||
|
||||
describe file('/srv/my_tablespace') do
|
||||
it { should be_directory }
|
||||
it { should be_mode 700 }
|
||||
it { should be_owned_by 'postgres' }
|
||||
it { should be_grouped_into 'postgres' }
|
||||
end
|
||||
|
||||
describe command('su - postgres -c "psql -qtc \"\l+ db2\""') do
|
||||
its(:stdout) { should match(/db2.*localUser.*UTF8.*C.UTF-8.*C.UTF-8.*my_space/) }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user