As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Unverified Commit ce6e8a45 authored by Ash McKenzie's avatar Ash McKenzie Committed by GitLab
Browse files

Merge branch 'fix-lint-uploadpack-gitalycall' into 'main'

Resolve `make lint` (golangci-lint) issues or `internal/command/uploadpack/gitalycall.go` and `internal/command/uploadpack/gitalycall_test.go`

Closes #711

See merge request https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/1025



Merged-by: default avatarAsh McKenzie <amckenzie@gitlab.com>
Approved-by: default avatarAsh McKenzie <amckenzie@gitlab.com>
Reviewed-by: default avatarAsh McKenzie <amckenzie@gitlab.com>
Co-authored-by: default avatargaurav.marwal <gauravmarwal@gmail.com>
parents 6fef4021 36f44d65
No related branches found
No related tags found
No related merge requests found
// Package uploadpack provides functionality for handling upload-pack command
package uploadpack
import (
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@ func TestUploadPack(t *testing.T) {
for _, network := range []string{"unix", "tcp", "dns"} {
t.Run(fmt.Sprintf("via %s network", network), func(t *testing.T) {
gitalyAddress, testServer := testserver.StartGitalyServer(t, network)
t.Log(fmt.Sprintf("Server address: %s", gitalyAddress))
t.Logf("Server address: %s", gitalyAddress)
requests := requesthandlers.BuildAllowedWithGitalyHandlers(t, gitalyAddress)
url := testserver.StartHttpServer(t, requests)
Loading
Loading
@@ -29,7 +29,7 @@ func TestUploadPack(t *testing.T) {
output := &bytes.Buffer{}
input := &bytes.Buffer{}
userId := "1"
userID := "1"
repo := "group/repo"
env := sshenv.Env{
Loading
Loading
@@ -39,7 +39,7 @@ func TestUploadPack(t *testing.T) {
}
args := &commandargs.Shell{
GitlabKeyId: userId,
GitlabKeyId: userID,
CommandType: commandargs.UploadPack,
SshArgs: []string{"git-upload-pack", repo},
Env: env,
Loading
Loading
@@ -76,7 +76,7 @@ func TestUploadPack(t *testing.T) {
require.Equal(t, v, actual[0])
}
require.Empty(t, testServer.ReceivedMD["some-other-ff"])
require.Equal(t, testServer.ReceivedMD["x-gitlab-correlation-id"][0], "a-correlation-id")
require.Equal(t, "a-correlation-id", testServer.ReceivedMD["x-gitlab-correlation-id"][0])
})
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment