Remove hardcoding of mattermost home and add spec for it
This commit is contained in:
parent
b5460d7c02
commit
ca96b4e9ba
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
exec 2>&1
|
||||
cd /opt/gitlab/embedded/service/mattermost
|
||||
exec chpst -P -U <%= node['gitlab']['mattermost']['username'] %> -u <%= node['gitlab']['mattermost']['username'] %> /opt/gitlab/embedded/bin/mattermost -config /var/opt/gitlab/mattermost/config.json
|
||||
exec chpst -P -U <%= node['gitlab']['mattermost']['username'] %> -u <%= node['gitlab']['mattermost']['username'] %> /opt/gitlab/embedded/bin/mattermost -config <%= node['gitlab']['mattermost']['home'] %>/config.json
|
||||
|
|
|
@ -63,6 +63,15 @@ describe 'gitlab::mattermost' do
|
|||
}
|
||||
end
|
||||
|
||||
it 'creates mattermost configuration file in specified home folder' do
|
||||
stub_gitlab_rb(mattermost: {
|
||||
enable: true,
|
||||
home: '/var/local/gitlab/mattermost',
|
||||
})
|
||||
|
||||
expect(chef_run).to render_file('/opt/gitlab/sv/mattermost/run').with_content(/\-config \/var\/local\/gitlab\/mattermost\/config.json/)
|
||||
end
|
||||
|
||||
shared_examples 'no gitlab authorization performed' do
|
||||
it 'does not authorize mattermost with gitlab' do
|
||||
expect(chef_run).to_not run_ruby_block('authorize mattermost with gitlab')
|
||||
|
|
Loading…
Reference in New Issue