Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d6b121b7
Commit
d6b121b7
authored
Aug 09, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE->EE: Fix conflicts in spec/lib/gitlab/shell_spec.rb
parent
9ef6b3b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
53 deletions
+0
-53
spec/lib/gitlab/shell_spec.rb
spec/lib/gitlab/shell_spec.rb
+0
-53
No files found.
spec/lib/gitlab/shell_spec.rb
View file @
d6b121b7
...
...
@@ -545,7 +545,6 @@ describe Gitlab::Shell do
it
'raises an exception when the command fails'
do
expect_popen
.
and_return
([
"error"
,
1
])
<<<<<<<
HEAD
expect
{
fetch_remote
}.
to
raise_error
(
Gitlab
::
Shell
::
Error
,
"error"
)
end
...
...
@@ -596,58 +595,6 @@ describe Gitlab::Shell do
ssh_auth
=
build_ssh_auth
(
ssh_import?:
false
,
ssh_known_hosts:
'foo'
)
=======
expect
{
fetch_remote
}.
to
raise_error
(
Gitlab
::
Shell
::
Error
,
"error"
)
end
context
'SSH auth'
do
it
'passes the SSH key if specified'
do
expect_popen
(
'GITLAB_SHELL_SSH_KEY'
=>
'foo'
).
and_return
([
nil
,
0
])
ssh_auth
=
build_ssh_auth
(
ssh_key_auth?:
true
,
ssh_private_key:
'foo'
)
expect
(
fetch_remote
(
ssh_auth
)).
to
be_truthy
end
it
'does not pass an empty SSH key'
do
expect_popen
.
and_return
([
nil
,
0
])
ssh_auth
=
build_ssh_auth
(
ssh_key_auth:
true
,
ssh_private_key:
''
)
expect
(
fetch_remote
(
ssh_auth
)).
to
be_truthy
end
it
'does not pass the key unless SSH key auth is to be used'
do
expect_popen
.
and_return
([
nil
,
0
])
ssh_auth
=
build_ssh_auth
(
ssh_key_auth:
false
,
ssh_private_key:
'foo'
)
expect
(
fetch_remote
(
ssh_auth
)).
to
be_truthy
end
it
'passes the known_hosts data if specified'
do
expect_popen
(
'GITLAB_SHELL_KNOWN_HOSTS'
=>
'foo'
).
and_return
([
nil
,
0
])
ssh_auth
=
build_ssh_auth
(
ssh_known_hosts:
'foo'
)
expect
(
fetch_remote
(
ssh_auth
)).
to
be_truthy
end
it
'does not pass empty known_hosts data'
do
expect_popen
.
and_return
([
nil
,
0
])
ssh_auth
=
build_ssh_auth
(
ssh_known_hosts:
''
)
expect
(
fetch_remote
(
ssh_auth
)).
to
be_truthy
end
it
'does not pass known_hosts data unless SSH is to be used'
do
expect_popen
(
popen_vars
).
and_return
([
nil
,
0
])
ssh_auth
=
build_ssh_auth
(
ssh_import?:
false
,
ssh_known_hosts:
'foo'
)
>>>>>>>
upstream
/
master
expect
(
fetch_remote
(
ssh_auth
)).
to
be_truthy
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment