diff options
author | Rubén Dávila <ruben@gitlab.com> | 2018-08-01 17:47:14 +0300 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2018-09-07 20:27:35 +0300 |
commit | 007b81b8e298269bfdc5cac61bc11ae21b3825a5 (patch) | |
tree | 385debb0ca13ae715590388d5584cdf2ea0866c1 /spec/requests/api/internal_spec.rb | |
parent | 9083fc04f1add6f7e4628cdb10fef69c6b815ef5 (diff) |
Add receive_max_input_size setting to Application settings
If user has configure the setting then it will be passed to gitlab-shell
and gitlab-workhorse
Diffstat (limited to 'spec/requests/api/internal_spec.rb')
-rw-r--r-- | spec/requests/api/internal_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 6890f46c724..e0b5b34f9c4 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -369,6 +369,26 @@ describe API::Internal do expect(user.reload.last_activity_on).to be_nil end end + + context 'when receive_max_input_size has been updated' do + it 'returns custom git config' do + allow(Gitlab::CurrentSettings).to receive(:receive_max_input_size) { 1 } + + push(key, project) + + expect(json_response["git_config_options"]).to be_present + end + end + + context 'when receive_max_input_size is empty' do + it 'returns an empty git config' do + allow(Gitlab::CurrentSettings).to receive(:receive_max_input_size) { nil } + + push(key, project) + + expect(json_response["git_config_options"]).to be_empty + end + end end end |