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
Commit 5bd2d98e authored by Patrick Bajao's avatar Patrick Bajao
Browse files

Merge branch '500_git_upload_pack_test' into 'main'

Add acceptance test for git-upload-pack

See merge request gitlab-org/gitlab-shell!477
parents fb67770a 2a0f7c59
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -407,6 +407,29 @@ func TestGitReceivePackSuccess(t *testing.T) {
require.Equal(t, "0000", outputLines[len(outputLines)-1])
}
func TestGitUploadPackSuccess(t *testing.T) {
ensureGitalyRepository(t)
client := runSSHD(t, successAPI(t))
session, err := client.NewSession()
require.NoError(t, err)
defer session.Close()
output, err := session.Output(fmt.Sprintf("git-upload-pack %s", testRepo))
require.NoError(t, err)
outputLines := strings.Split(string(output), "\n")
require.Regexp(t, "^[0-9a-f]{44} HEAD.+", outputLines[0])
for i := 1; i < (len(outputLines) - 1); i++ {
require.Regexp(t, "^[0-9a-f]{44} refs/(heads|tags)/[^ ]+", outputLines[i])
}
require.Equal(t, "0000", outputLines[len(outputLines)-1])
}
func TestGitUploadArchiveSuccess(t *testing.T) {
ensureGitalyRepository(t)
Loading
Loading
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