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 fe170537 authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'id-fix-git-receive-pack-in-tests' into 'main'

Fix failing TestGitReceivePackSuccess

See merge request gitlab-org/gitlab-shell!675
parents 8f2a4e90 67345c2a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -387,12 +387,25 @@ func TestGitReceivePackSuccess(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-receive-pack %s", testRepo))
stdin, err := session.StdinPipe()
require.NoError(t, err)
stdout, err := session.StdoutPipe()
require.NoError(t, err)
err = session.Start(fmt.Sprintf("git-receive-pack %s", testRepo))
require.NoError(t, err)
// Gracefully close connection
_, err = fmt.Fprintln(stdin, "0000")
require.NoError(t, err)
stdin.Close()
output, err := io.ReadAll(stdout)
require.NoError(t, err)
outputLines := strings.Split(string(output), "\n")
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