healthcheck returns 200 status code
This commit is contained in:
parent
7547032ce7
commit
8fa9490ccd
2
Gemfile
2
Gemfile
|
|
@ -4,7 +4,5 @@ group :test do
|
|||
gem 'docker-api'
|
||||
gem 'rake'
|
||||
gem 'serverspec'
|
||||
gem 'rspec-wait'
|
||||
gem 'rspec-retry'
|
||||
gem 'pry'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -32,11 +32,7 @@ GEM
|
|||
rspec-mocks (3.7.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.7.0)
|
||||
rspec-retry (0.5.6)
|
||||
rspec-core (> 3.3, < 3.8)
|
||||
rspec-support (3.7.0)
|
||||
rspec-wait (0.0.9)
|
||||
rspec (>= 3, < 4)
|
||||
serverspec (2.41.3)
|
||||
multi_json
|
||||
rspec (~> 3.0)
|
||||
|
|
@ -56,8 +52,6 @@ DEPENDENCIES
|
|||
docker-api
|
||||
pry
|
||||
rake
|
||||
rspec-retry
|
||||
rspec-wait
|
||||
serverspec
|
||||
|
||||
BUNDLED WITH
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
require 'spec_helper'
|
||||
require 'rspec/wait'
|
||||
|
||||
describe 'passbolt_api service' do
|
||||
|
||||
|
|
@ -31,10 +30,6 @@ describe 'passbolt_api service' do
|
|||
'DATASOURCES_DEFAULT_PASSWORD=P4ssb0lt',
|
||||
'DATASOURCES_DEFAULT_USERNAME=passbolt',
|
||||
'DATASOURCES_DEFAULT_DATABASE=passbolt',
|
||||
#'DATASOURCES_DEFAULT_PORT=3306',
|
||||
#'PASSBOLT_GPG_KEYRING=/var/lib/nginx/.gnupg',
|
||||
#'PASSBOLT_GPG_SERVER_KEY_PUBLIC=/var/www/passbolt/config/gpg/serverkey.asc',
|
||||
#'PASSBOLT_GPG_SERVER_KEY_PRIVATE=/var/www/passbolt/config/gpg/serverkey_private.asc'
|
||||
],
|
||||
'Image' => @image.id)
|
||||
@container.start
|
||||
|
|
@ -49,6 +44,9 @@ describe 'passbolt_api service' do
|
|||
@container.kill
|
||||
end
|
||||
|
||||
let(:http_path) { "/healthcheck/status.json" }
|
||||
let(:healthcheck) { 'curl -s -o /dev/null -w "%{http_code}" http://localhost/healthcheck/status.json' }
|
||||
|
||||
describe 'php service' do
|
||||
it 'is running supervised' do
|
||||
expect(process('php-fpm')).to be_running.under('supervisor')
|
||||
|
|
@ -79,4 +77,9 @@ describe 'passbolt_api service' do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'passbolt healthcheck' do
|
||||
it 'returns 200' do
|
||||
expect(command(healthcheck).stdout).to eq '200'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue