Differentiate shared test context using options hash instead of subject.
+ fix typos, and capitalization + point configuration to `gitlab.rb` as well
This commit is contained in:
parent
2951a09967
commit
063f03b9d7
3 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue