added specs
This commit is contained in:
parent
a66f73df3c
commit
714b96939a
|
|
@ -17,6 +17,7 @@ describe 'Dockerfile' do
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:nginx_conf) { '/etc/nginx/nginx.conf' }
|
let(:nginx_conf) { '/etc/nginx/nginx.conf' }
|
||||||
|
let(:php_conf) { '/usr/local/etc/php-fpm.d/expose.conf' }
|
||||||
let(:site_conf) { '/etc/nginx/conf.d/default.conf' }
|
let(:site_conf) { '/etc/nginx/conf.d/default.conf' }
|
||||||
let(:passbolt_home) { '/var/www/passbolt' }
|
let(:passbolt_home) { '/var/www/passbolt' }
|
||||||
let(:passbolt_tmp) { '/var/www/passbolt/tmp' }
|
let(:passbolt_tmp) { '/var/www/passbolt/tmp' }
|
||||||
|
|
@ -71,6 +72,16 @@ describe 'Dockerfile' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'php config' do
|
||||||
|
it 'exists' do
|
||||||
|
expect(file(php_conf)).to exist
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does not expose php version' do
|
||||||
|
expect(file(php_conf).content).to match '^php_flag\[expose_php\]\s+=\s+off$'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe 'nginx configuration' do
|
describe 'nginx configuration' do
|
||||||
it 'is installed correctly' do
|
it 'is installed correctly' do
|
||||||
expect(file(nginx_conf)).to exist
|
expect(file(nginx_conf)).to exist
|
||||||
|
|
@ -93,6 +104,10 @@ describe 'Dockerfile' do
|
||||||
it 'points to the correct root folder' do
|
it 'points to the correct root folder' do
|
||||||
expect(file(site_conf).content).to match 'root /var/www/passbolt/webroot'
|
expect(file(site_conf).content).to match 'root /var/www/passbolt/webroot'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'has server tokens off' do
|
||||||
|
expect(file(nginx_conf).content).to match(/^\s+server_tokens off;/)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'ports exposed' do
|
describe 'ports exposed' do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue