tests for nginx and php versions

This commit is contained in:
Diego Lendoiro 2018-08-08 11:37:27 +02:00
parent 4ed53e5f43
commit 54f471e31b
1 changed files with 11 additions and 1 deletions

View File

@ -49,7 +49,6 @@ describe 'passbolt_api service' do
let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }
let(:uri) { "/healthcheck/status.json" }
let(:curl) { "curl -sk -o /dev/null -w '%{http_code}' -H 'Host: passbolt.local' https://#{passbolt_host}/#{uri}" }
let(:conf_app) { "curl -sk -o /dev/null -w '%{http_code}' -H 'Host: passbolt.local' https://#{passbolt_host}/conf/app.php" }
describe 'php service' do
it 'is running supervised' do
@ -114,4 +113,15 @@ describe 'passbolt_api service' do
end
end
describe 'hide information' do
let(:curl) { "curl -Isk -H 'Host: passbolt.local' https://#{passbolt_host}/" }
it 'hides php version' do
expect(command("#{curl} | grep 'X-Powered-By: PHP'").stdout).to be_empty
end
it 'hides nginx version' do
expect(command("#{curl} | grep 'Server:'").stdout).to match 'Server: nginx'
end
end
end