gitalytest

package
v14.57.3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gitalytest provides shared setup and assertions for Gitaly integration tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireMetadata

func RequireMetadata(t *testing.T, server *testserver.TestGitalyServer, expected MetadataExpectations)

RequireMetadata asserts the common and command-specific Gitaly request metadata.

func RunAllNetworks

func RunAllNetworks(t *testing.T, run func(t *testing.T, servers Servers))

RunAllNetworks runs a test callback against Unix, TCP, and DNS Gitaly addresses.

Types

type CommandOptions

type CommandOptions struct {
	GitlabURL      string
	CommandType    commandargs.CommandType
	Repository     string
	RemoteAddr     string
	GitlabUsername string
	GitlabKeyID    string
	CorrelationID  string
	ClientName     string
}

CommandOptions defines the command test setup inputs.

type CommandSetup

type CommandSetup struct {
	Context    context.Context
	Config     *config.Config
	Args       *commandargs.Shell
	ReadWriter *readwriter.ReadWriter
	Output     *bytes.Buffer
}

CommandSetup contains the initialized dependencies for a command test.

func NewCommandSetup

func NewCommandSetup(options CommandOptions) CommandSetup

NewCommandSetup initializes command arguments, context, configuration, and I/O.

type MetadataExpectations

type MetadataExpectations struct {
	ClientNameSuffix string
	CorrelationID    string
	RemoteAddr       string
}

MetadataExpectations defines expected Gitaly request metadata.

type Servers

type Servers struct {
	GitlabURL string
	Gitaly    *testserver.TestGitalyServer
}

Servers contains the test services started for a network subtest.

Jump to

Keyboard shortcuts

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