File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -387,12 +387,25 @@ func TestGitReceivePackSuccess(t *testing.T) {
387387 ensureGitalyRepository (t )
388388
389389 client := runSSHD (t , successAPI (t ))
390-
391390 session , err := client .NewSession ()
392391 require .NoError (t , err )
393392 defer session .Close ()
394393
395- output , err := session .Output (fmt .Sprintf ("git-receive-pack %s" , testRepo ))
394+ stdin , err := session .StdinPipe ()
395+ require .NoError (t , err )
396+
397+ stdout , err := session .StdoutPipe ()
398+ require .NoError (t , err )
399+
400+ err = session .Start (fmt .Sprintf ("git-receive-pack %s" , testRepo ))
401+ require .NoError (t , err )
402+
403+ // Gracefully close connection
404+ _ , err = fmt .Fprintln (stdin , "0000" )
405+ require .NoError (t , err )
406+ stdin .Close ()
407+
408+ output , err := io .ReadAll (stdout )
396409 require .NoError (t , err )
397410
398411 outputLines := strings .Split (string (output ), "\n " )
You can’t perform that action at this time.
0 commit comments