Skip to content

Commit 06b5533

Browse files
author
Eric Ju
committed
Remove SSHUploadPack from TestGitalyServer
SSHUploadPack has been removed from Gitaly proto file, so TestGitalyServer cannot refer to it anymore. This commit removes SSHUploadPack related code.
1 parent fbb299e commit 06b5533

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

client/testserver/gitalyserver.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ func (s *TestGitalyServer) SSHReceivePack(stream pb.SSHService_SSHReceivePackSer
3535
return stream.Send(&pb.SSHReceivePackResponse{Stdout: response})
3636
}
3737

38-
func (s *TestGitalyServer) SSHUploadPack(stream pb.SSHService_SSHUploadPackServer) error {
39-
req, err := stream.Recv()
40-
if err != nil {
41-
return err
42-
}
43-
44-
s.ReceivedMD, _ = metadata.FromIncomingContext(stream.Context())
45-
46-
response := []byte("UploadPack: " + req.Repository.GlRepository)
47-
return stream.Send(&pb.SSHUploadPackResponse{Stdout: response})
48-
}
49-
5038
func (s *TestGitalyServer) SSHUploadPackWithSidechannel(ctx context.Context, req *pb.SSHUploadPackWithSidechannelRequest) (*pb.SSHUploadPackWithSidechannelResponse, error) {
5139
conn, err := client.OpenServerSidechannel(ctx)
5240
if err != nil {

support/lint_last_known_acceptable.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ client/httpsclient_test.go:109:5: expected-actual: need to reverse actual and ex
1818
client/testserver/gitalyserver.go:1:1: package-comments: should have a package comment (revive)
1919
client/testserver/gitalyserver.go:21:6: exported: exported type TestGitalyServer should have comment or be unexported (revive)
2020
client/testserver/gitalyserver.go:26:1: exported: exported method TestGitalyServer.SSHReceivePack should have comment or be unexported (revive)
21-
client/testserver/gitalyserver.go:38:1: exported: exported method TestGitalyServer.SSHUploadPack should have comment or be unexported (revive)
22-
client/testserver/gitalyserver.go:50:1: exported: exported method TestGitalyServer.SSHUploadPackWithSidechannel should have comment or be unexported (revive)
23-
client/testserver/gitalyserver.go:55:18: Error return value of `conn.Close` is not checked (errcheck)
24-
client/testserver/gitalyserver.go:70:1: exported: exported method TestGitalyServer.SSHUploadArchive should have comment or be unexported (revive)
25-
client/testserver/gitalyserver.go:82:1: exported: exported function StartGitalyServer should have comment or be unexported (revive)
26-
client/testserver/gitalyserver.go:131:3: go-require: require must only be used in the goroutine running the test function (testifylint)
21+
client/testserver/gitalyserver.go:38:1: exported: exported method TestGitalyServer.SSHUploadPackWithSidechannel should have comment or be unexported (revive)
22+
client/testserver/gitalyserver.go:43:18: Error return value of `conn.Close` is not checked (errcheck)
23+
client/testserver/gitalyserver.go:58:1: exported: exported method TestGitalyServer.SSHUploadArchive should have comment or be unexported (revive)
24+
client/testserver/gitalyserver.go:70:1: exported: exported function StartGitalyServer should have comment or be unexported (revive)
25+
client/testserver/gitalyserver.go:119:3: go-require: require must only be used in the goroutine running the test function (testifylint)
2726
client/testserver/testserver.go:1:1: ST1000: at least one file in a package should have a package comment (stylecheck)
2827
client/testserver/testserver.go:20:6: exported: exported type TestRequestHandler should have comment or be unexported (revive)
2928
client/testserver/testserver.go:46:12: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)

0 commit comments

Comments
 (0)