testserver

package
v14.47.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package testserver provides test server implementations for testing GitLab Shell client functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartHTTPSServer added in v14.40.0

func StartHTTPSServer(t *testing.T, handlers []TestRequestHandler, clientCAPath string) string

StartHTTPSServer starts a TCP based HTTPS capable server

func StartHTTPServer added in v14.40.0

func StartHTTPServer(t *testing.T, handlers []TestRequestHandler) string

StartHTTPServer starts a TCP based HTTP server

func StartRetryHTTPServer added in v14.40.0

func StartRetryHTTPServer(t *testing.T, handlers []TestRequestHandler) string

StartRetryHTTPServer starts a TCP based HTTP server with retry capabilities

func StartSocketHTTPServer added in v14.40.0

func StartSocketHTTPServer(t *testing.T, handlers []TestRequestHandler) string

StartSocketHTTPServer starts a socket based HTTP server

Types

type TestGitalyServer

type TestGitalyServer struct {
	ReceivedMD metadata.MD
	pb.UnimplementedSSHServiceServer
}

TestGitalyServer is a test implementation of the Gitaly SSH service server.

func StartGitalyServer

func StartGitalyServer(t *testing.T, network string) (string, *TestGitalyServer)

StartGitalyServer starts a test Gitaly server for the specified network type.

func (*TestGitalyServer) SSHReceivePack

func (s *TestGitalyServer) SSHReceivePack(stream pb.SSHService_SSHReceivePackServer) error

SSHReceivePack handles the SSH receive pack RPC for testing.

func (*TestGitalyServer) SSHUploadArchive

func (s *TestGitalyServer) SSHUploadArchive(stream pb.SSHService_SSHUploadArchiveServer) error

SSHUploadArchive handles the SSH upload archive RPC for testing.

func (*TestGitalyServer) SSHUploadPackWithSidechannel

SSHUploadPackWithSidechannel handles the SSH upload pack with sidechannel RPC for testing.

type TestRequestHandler

type TestRequestHandler struct {
	Path    string
	Handler func(w http.ResponseWriter, r *http.Request)
}

TestRequestHandler defines a test HTTP request handler with a path and handler function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL