tests for nginx and php versions
This commit is contained in:
parent
4ed53e5f43
commit
54f471e31b
|
|
@ -49,7 +49,6 @@ describe 'passbolt_api service' do
|
||||||
let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }
|
let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }
|
||||||
let(:uri) { "/healthcheck/status.json" }
|
let(:uri) { "/healthcheck/status.json" }
|
||||||
let(:curl) { "curl -sk -o /dev/null -w '%{http_code}' -H 'Host: passbolt.local' https://#{passbolt_host}/#{uri}" }
|
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
|
describe 'php service' do
|
||||||
it 'is running supervised' do
|
it 'is running supervised' do
|
||||||
|
|
@ -114,4 +113,15 @@ describe 'passbolt_api service' do
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue