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
8a31c5b8
Commit
8a31c5b8
authored
Dec 11, 2018
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove RepoPath from the API response
parent
0e575a10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
15 deletions
+1
-15
gitaly_test.go
gitaly_test.go
+0
-1
internal/api/api.go
internal/api/api.go
+1
-5
main_test.go
main_test.go
+0
-9
No files found.
gitaly_test.go
View file @
8a31c5b8
...
@@ -36,7 +36,6 @@ func TestFailedCloneNoGitaly(t *testing.T) {
...
@@ -36,7 +36,6 @@ func TestFailedCloneNoGitaly(t *testing.T) {
authBody
:=
&
api
.
Response
{
authBody
:=
&
api
.
Response
{
GL_ID
:
"user-123"
,
GL_ID
:
"user-123"
,
GL_USERNAME
:
"username"
,
GL_USERNAME
:
"username"
,
RepoPath
:
repoPath
(
t
),
// This will create a failure to connect to Gitaly
// This will create a failure to connect to Gitaly
GitalyServer
:
gitaly
.
Server
{
Address
:
"unix:/nonexistent"
},
GitalyServer
:
gitaly
.
Server
{
Address
:
"unix:/nonexistent"
},
}
}
...
...
internal/api/api.go
View file @
8a31c5b8
...
@@ -106,9 +106,6 @@ type Response struct {
...
@@ -106,9 +106,6 @@ type Response struct {
// GL_REPOSITORY is an environment variable used by gitlab-shell hooks during
// GL_REPOSITORY is an environment variable used by gitlab-shell hooks during
// 'git push' and 'git pull'
// 'git push' and 'git pull'
GL_REPOSITORY
string
GL_REPOSITORY
string
// RepoPath is the full path on disk to the Git repository the request is
// about
RepoPath
string
// GitConfigOptions holds the custom options that we want to pass to the git command
// GitConfigOptions holds the custom options that we want to pass to the git command
GitConfigOptions
[]
string
GitConfigOptions
[]
string
// StoreLFSPath is provided by the GitLab Rails application to mark where the tmp file should be placed.
// StoreLFSPath is provided by the GitLab Rails application to mark where the tmp file should be placed.
...
@@ -132,8 +129,7 @@ type Response struct {
...
@@ -132,8 +129,7 @@ type Response struct {
Terminal
*
TerminalSettings
Terminal
*
TerminalSettings
// GitalyServer specifies an address and authentication token for a gitaly server we should connect to.
// GitalyServer specifies an address and authentication token for a gitaly server we should connect to.
GitalyServer
gitaly
.
Server
GitalyServer
gitaly
.
Server
// Repository object for making gRPC requests to Gitaly. This will
// Repository object for making gRPC requests to Gitaly.
// eventually replace the RepoPath field.
Repository
pb
.
Repository
Repository
pb
.
Repository
// For git-http, does the requestor have the right to view all refs?
// For git-http, does the requestor have the right to view all refs?
ShowAllRefs
bool
ShowAllRefs
bool
...
...
main_test.go
View file @
8a31c5b8
...
@@ -522,11 +522,9 @@ func runOrFail(t *testing.T, cmd *exec.Cmd) {
...
@@ -522,11 +522,9 @@ func runOrFail(t *testing.T, cmd *exec.Cmd) {
}
}
func
gitOkBody
(
t
*
testing
.
T
)
*
api
.
Response
{
func
gitOkBody
(
t
*
testing
.
T
)
*
api
.
Response
{
repoPath
:=
repoPath
(
t
)
return
&
api
.
Response
{
return
&
api
.
Response
{
GL_ID
:
"user-123"
,
GL_ID
:
"user-123"
,
GL_USERNAME
:
"username"
,
GL_USERNAME
:
"username"
,
RepoPath
:
repoPath
,
Repository
:
pb
.
Repository
{
Repository
:
pb
.
Repository
{
StorageName
:
"default"
,
StorageName
:
"default"
,
RelativePath
:
"foo/bar.git"
,
RelativePath
:
"foo/bar.git"
,
...
@@ -534,13 +532,6 @@ func gitOkBody(t *testing.T) *api.Response {
...
@@ -534,13 +532,6 @@ func gitOkBody(t *testing.T) *api.Response {
}
}
}
}
func
repoPath
(
t
*
testing
.
T
)
string
{
cwd
,
err
:=
os
.
Getwd
()
require
.
NoError
(
t
,
err
)
return
path
.
Join
(
cwd
,
testRepoRoot
,
testRepo
)
}
func
httpGet
(
t
*
testing
.
T
,
url
string
,
headers
map
[
string
]
string
)
(
*
http
.
Response
,
string
)
{
func
httpGet
(
t
*
testing
.
T
,
url
string
,
headers
map
[
string
]
string
)
(
*
http
.
Response
,
string
)
{
req
,
err
:=
http
.
NewRequest
(
"GET"
,
url
,
nil
)
req
,
err
:=
http
.
NewRequest
(
"GET"
,
url
,
nil
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
...
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