diff options
author | Rubén Dávila <ruben@gitlab.com> | 2018-08-07 17:12:13 -0500 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2018-08-07 17:12:13 -0500 |
commit | f4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00 (patch) | |
tree | 5eaa37479e8c04c35bd3cc30485ca97e73cef3eb /spec | |
parent | 21d6b3154d19e29b9aafd961812e7b8b516e1729 (diff) | |
download | gitlab-shell-f4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00.tar.gz |
Pass custom git_config_options to Gitalyo
The /api/internal/allowed endpoint on GitLab has been updated to return some
custom git options that can be used with git commands, we need to pass these received options to Gitaly.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/action/gitaly_spec.rb | 4 | ||||
-rw-r--r-- | spec/gitlab_access_spec.rb | 1 | ||||
-rw-r--r-- | spec/gitlab_shell_spec.rb | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/spec/action/gitaly_spec.rb b/spec/action/gitaly_spec.rb index a5f6f0b..7b34ccd 100644 --- a/spec/action/gitaly_spec.rb +++ b/spec/action/gitaly_spec.rb @@ -10,6 +10,7 @@ describe Action::Gitaly do let(:key) { Actor::Key.new(key_id) } let(:gl_repository) { 'project-1' } let(:gl_username) { 'testuser' } + let(:git_config_options) { ['receive.MaxInputSize=10000'] } let(:git_protocol) { 'version=2' } let(:tmp_repos_path) { File.join(ROOT_PATH, 'tmp', 'repositories') } let(:repo_name) { 'gitlab-ci.git' } @@ -37,7 +38,7 @@ describe Action::Gitaly do end subject do - described_class.new(key, gl_repository, gl_username, git_protocol, repository_path, gitaly) + described_class.new(key, gl_repository, gl_username, git_config_options, git_protocol, repository_path, gitaly) end describe '#execute' do @@ -68,6 +69,7 @@ describe Action::Gitaly do 'gl_repository' => gl_repository, 'gl_id' => key_str, 'gl_username' => gl_username, + 'git_config_options' => git_config_options, 'git_protocol' => git_protocol } end diff --git a/spec/gitlab_access_spec.rb b/spec/gitlab_access_spec.rb index 73ebf2e..c99959e 100644 --- a/spec/gitlab_access_spec.rb +++ b/spec/gitlab_access_spec.rb @@ -12,6 +12,7 @@ describe GitlabAccess do 'key-1', 'project-1', 'testuser', + ['receive.MaxInputSize=10000'], 'version=2', '/home/git/repositories', nil diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb index c46da5d..5b8c8a5 100644 --- a/spec/gitlab_shell_spec.rb +++ b/spec/gitlab_shell_spec.rb @@ -20,6 +20,7 @@ describe GitlabShell do let(:repo_path) { File.join(tmp_repos_path, repo_name) } let(:gl_repository) { 'project-1' } let(:gl_username) { 'testuser' } + let(:git_config_options) { ['receive.MaxInputSize=10000'] } let(:git_protocol) { 'version=2' } let(:api) { double(GitlabNet) } @@ -29,6 +30,7 @@ describe GitlabShell do actor, gl_repository, gl_username, + git_config_options, git_protocol, repo_path, { 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default' } , 'address' => 'unix:gitaly.socket' }) |