Commit 063f03b9 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Differentiate shared test context using options hash instead of subject.

+ fix typos, and capitalization
+ point configuration to `gitlab.rb` as well
parent 2951a099
......@@ -16,8 +16,8 @@ traffic until the system is ready or restart the container as needed.
## IP Whitelist
To access monitoring resources client IP needs to be included in the whitelist.
To add or remove hosts or ip ranges from the list you can edit `gitlab.yml`.
To access monitoring resources the client IP needs to be included in the whitelist.
To add or remove hosts or IP ranges from the list you can edit `gitlab.rb` or `gitlab.yml`.
Example whitelist configuration:
```yaml
......
......@@ -36,7 +36,7 @@ describe HealthCheckController do
expect(response.content_type).to eq 'text/plain'
end
it 'supports successful plaintest response' do
it 'supports passing the token in query params' do
get :index, token: token
expect(response).to be_success
......@@ -50,7 +50,7 @@ describe HealthCheckController do
allow(Gitlab::RequestContext).to receive(:client_ip).and_return(whitelisted_ip)
end
it 'supports successful plaintest response' do
it 'supports successful plaintext response' do
get :index
expect(response).to be_success
......@@ -97,7 +97,7 @@ describe HealthCheckController do
allow(Gitlab::RequestContext).to receive(:client_ip).and_return(whitelisted_ip)
end
it 'supports failure plaintest response' do
it 'supports failure plaintext response' do
get :index
expect(response).to have_http_status(500)
......
......@@ -15,7 +15,9 @@ describe HealthController do
describe '#readiness' do
shared_context 'endpoint responding with readiness data' do
subject { get :readiness }
let(:request_params) { {} }
subject { get :readiness, request_params }
it 'responds with readiness checks data' do
subject
......@@ -58,7 +60,7 @@ describe HealthController do
context 'token passed as URL param' do
it_behaves_like 'endpoint responding with readiness data' do
subject { get :readiness, token: token }
let(:request_params) { { token: token } }
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment