Commit 8a31c5b8 authored by Nick Thomas's avatar Nick Thomas

Remove RepoPath from the API response

parent 0e575a10
......@@ -36,7 +36,6 @@ func TestFailedCloneNoGitaly(t *testing.T) {
authBody := &api.Response{
GL_ID: "user-123",
GL_USERNAME: "username",
RepoPath: repoPath(t),
// This will create a failure to connect to Gitaly
GitalyServer: gitaly.Server{Address: "unix:/nonexistent"},
}
......
......@@ -106,9 +106,6 @@ type Response struct {
// GL_REPOSITORY is an environment variable used by gitlab-shell hooks during
// 'git push' and 'git pull'
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 []string
// StoreLFSPath is provided by the GitLab Rails application to mark where the tmp file should be placed.
......@@ -132,8 +129,7 @@ type Response struct {
Terminal *TerminalSettings
// GitalyServer specifies an address and authentication token for a gitaly server we should connect to.
GitalyServer gitaly.Server
// Repository object for making gRPC requests to Gitaly. This will
// eventually replace the RepoPath field.
// Repository object for making gRPC requests to Gitaly.
Repository pb.Repository
// For git-http, does the requestor have the right to view all refs?
ShowAllRefs bool
......
......@@ -522,11 +522,9 @@ func runOrFail(t *testing.T, cmd *exec.Cmd) {
}
func gitOkBody(t *testing.T) *api.Response {
repoPath := repoPath(t)
return &api.Response{
GL_ID: "user-123",
GL_USERNAME: "username",
RepoPath: repoPath,
Repository: pb.Repository{
StorageName: "default",
RelativePath: "foo/bar.git",
......@@ -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) {
req, err := http.NewRequest("GET", url, nil)
require.NoError(t, err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment