summaryrefslogtreecommitdiff
path: root/spec/gitlab_shell_spec.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-07-31 16:02:29 +0200
committerJames Lopez <james@jameslopez.es>2018-08-01 07:51:05 +0200
commit66e00351605afd524c1ac8df7fcd0690bd074747 (patch)
treee4e67ff81c5962ada99e2f09bf2e48596b2ff795 /spec/gitlab_shell_spec.rb
parent72888f59a57084a7dab49b3b67bc8622db34777f (diff)
downloadgitlab-shell-66e00351605afd524c1ac8df7fcd0690bd074747.tar.gz
use GIT_PROTOCOL env variable in gitlab_shell#exec
Diffstat (limited to 'spec/gitlab_shell_spec.rb')
-rw-r--r--spec/gitlab_shell_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb
index f2c215e..382cad4 100644
--- a/spec/gitlab_shell_spec.rb
+++ b/spec/gitlab_shell_spec.rb
@@ -162,6 +162,10 @@ describe GitlabShell do
)
end
+ before do
+ allow(ENV).to receive(:[]).with('GIT_PROTOCOL').and_return(git_protocol)
+ end
+
shared_examples_for 'upload-pack' do |command|
let(:ssh_cmd) { "#{command} gitlab-ci.git" }
after { subject.exec(ssh_cmd) }
@@ -462,7 +466,7 @@ describe GitlabShell do
'GL_ID' => gl_id,
'GL_PROTOCOL' => 'ssh',
'GL_REPOSITORY' => gl_repository,
- 'GL_USERNAME' => 'testuser',
+ 'GL_USERNAME' => 'testuser'
}
end
let(:exec_options) { { unsetenv_others: true, chdir: ROOT_PATH } }