Ensure PostgreSQL user is created for Geo installations

We had one customer use an external PostgreSQL server and activate the Geo
secondary server, and this did not create a `gitlab-psql` user by default.

Closes #2301
This commit is contained in:
Stan Hu 2017-05-31 23:25:17 -07:00
parent 32897884e1
commit 4bedc5f156
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,8 @@ postgresql_username = account_helper.postgresql_user
pg_helper = GeoPgHelper.new(node)
include_recipe 'gitlab::postgresql_user'
directory postgresql_dir do
owner postgresql_username
mode '0755'

View File

@ -35,6 +35,10 @@ describe 'geo postgresql 9.2' do
expect(chef_run).to include_recipe('gitlab::postgresql-bin')
end
it 'includes the postgresql_user recipe' do
expect(chef_run).to include_recipe('gitlab::postgresql_user')
end
it 'creates the gitlab_geo role in the geo-postgresql database' do
expect(chef_run).to create_postgresql_user('gitlab_geo')
end