Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-07-05 01:12:21 +0300
committerPawel Chojnacki <pawel@chojnacki.ws>2017-07-05 01:46:12 +0300
commit6d60e265b1bb0212803d301d723c12affe366397 (patch)
treefd2249217a62119d6f1818e4e7ebbb484398b7fe /spec/controllers/health_controller_spec.rb
parent2f875c40374597ca98104cd40a357a9a928335ff (diff)
Add spaces between test phases
+ fix wrong test setup
Diffstat (limited to 'spec/controllers/health_controller_spec.rb')
-rw-r--r--spec/controllers/health_controller_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/controllers/health_controller_spec.rb b/spec/controllers/health_controller_spec.rb
index 3e4370652d0..4b22155a431 100644
--- a/spec/controllers/health_controller_spec.rb
+++ b/spec/controllers/health_controller_spec.rb
@@ -8,7 +8,7 @@ describe HealthController do
let(:not_whitelisted_ip) { '127.0.0.2' }
before do
- allow(Settings.monitoring).to receive(:ip_whitelist).and_return([IPAddr.new(whitelisted_ip)])
+ allow(Settings.monitoring).to receive(:ip_whitelist).and_return([whitelisted_ip])
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
end
@@ -20,6 +20,7 @@ describe HealthController do
it 'returns proper response' do
get :readiness
+
expect(json_response['db_check']['status']).to eq('ok')
expect(json_response['redis_check']['status']).to eq('ok')
expect(json_response['fs_shards_check']['status']).to eq('ok')
@@ -34,6 +35,7 @@ describe HealthController do
it 'returns proper response' do
get :readiness
+
expect(response.status).to eq(404)
end
end
@@ -47,6 +49,7 @@ describe HealthController do
it 'returns proper response' do
get :liveness
+
expect(json_response['db_check']['status']).to eq('ok')
expect(json_response['redis_check']['status']).to eq('ok')
expect(json_response['fs_shards_check']['status']).to eq('ok')
@@ -60,6 +63,7 @@ describe HealthController do
it 'returns proper response' do
get :liveness
+
expect(response.status).to eq(404)
end
end