diff options
author | Nick Thomas <nick@gitlab.com> | 2021-06-29 16:13:25 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2021-06-29 16:13:25 +0100 |
commit | 07ab536943e35c8a0f45b88be95ed343e71ba03c (patch) | |
tree | d494d18b47384eebbe82afd6d30cb3510d7e13a6 /spec | |
parent | 1a299b07881096ae7e5f5190687d2d6318662219 (diff) | |
download | gitlab-shell-07ab536943e35c8a0f45b88be95ed343e71ba03c.tar.gz |
Fix a failing spec
When the shell environment includes SSH_CONNECTION, one spec fails as
the way we're stubbing the environment to the subprocess doesn't wipe
out the pre-existing variable. This commit changes how we do it so the
spec passes even in this environment.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/gitlab_shell_discover_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/gitlab_shell_discover_spec.rb b/spec/gitlab_shell_discover_spec.rb index ea99067..225d6b9 100644 --- a/spec/gitlab_shell_discover_spec.rb +++ b/spec/gitlab_shell_discover_spec.rb @@ -108,7 +108,7 @@ describe 'bin/gitlab-shell' do end it 'outputs "Only SSH allowed"' do - _, stderr, status = run!(["-c/usr/share/webapps/gitlab-shell/bin/gitlab-shell", "username-someuser"], env: {}) + _, stderr, status = run!(["-c/usr/share/webapps/gitlab-shell/bin/gitlab-shell", "username-someuser"], env: {'SSH_CONNECTION' => ''}) expect(stderr).to eq("Only SSH allowed\n") expect(status).not_to be_success |