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
8fad0738
Commit
8fad0738
authored
May 25, 2018
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return '/' as a bogus repo path to gitlab-shell
parent
a33d5916
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
lib/api/internal.rb
lib/api/internal.rb
+5
-1
spec/requests/api/internal_spec.rb
spec/requests/api/internal_spec.rb
+4
-4
No files found.
lib/api/internal.rb
View file @
8fad0738
...
...
@@ -59,7 +59,11 @@ module API
status:
true
,
gl_repository:
gl_repository
,
gl_username:
user
&
.
username
,
repository_path:
nil
,
# This repository_path is a bogus value but gitlab-shell still requires
# its presence. https://gitlab.com/gitlab-org/gitlab-shell/issues/135
repository_path:
'/'
,
gitaly:
gitaly_payload
(
params
[
:action
])
}
end
...
...
spec/requests/api/internal_spec.rb
View file @
8fad0738
...
...
@@ -277,7 +277,7 @@ describe API::Internal do
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
be_nil
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"wiki-
#{
project
.
id
}
"
)
expect
(
user
).
not_to
have_an_activity_record
end
...
...
@@ -289,7 +289,7 @@ describe API::Internal do
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
be_nil
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"wiki-
#{
project
.
id
}
"
)
expect
(
user
).
to
have_an_activity_record
end
...
...
@@ -301,7 +301,7 @@ describe API::Internal do
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
be_nil
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"project-
#{
project
.
id
}
"
)
expect
(
json_response
[
"gitaly"
]).
not_to
be_nil
expect
(
json_response
[
"gitaly"
][
"repository"
]).
not_to
be_nil
...
...
@@ -320,7 +320,7 @@ describe API::Internal do
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
[
"status"
]).
to
be_truthy
expect
(
json_response
[
"repository_path"
]).
to
be_nil
expect
(
json_response
[
"repository_path"
]).
to
eq
(
'/'
)
expect
(
json_response
[
"gl_repository"
]).
to
eq
(
"project-
#{
project
.
id
}
"
)
expect
(
json_response
[
"gitaly"
]).
not_to
be_nil
expect
(
json_response
[
"gitaly"
][
"repository"
]).
not_to
be_nil
...
...
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