e2e

package
v1.0.5-0...-7826c6c Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestMain

func TestMain(m *testing.M)

Types

type HarnessOptions

type HarnessOptions struct {
	ConfigPath    string
	ConfigContent string
	MockServerURL string
	Env           map[string]string
}

type MockServer

type MockServer struct {
	Server      *httptest.Server
	FixtureDir  string
	ProjectRoot string
	// contains filtered or unexported fields
}

func NewMockServer

func NewMockServer(t *testing.T, fixtureDir string) *MockServer

func (*MockServer) Close

func (ms *MockServer) Close()

func (*MockServer) Downloads

func (ms *MockServer) Downloads() []string

Downloads reports the release assets fetched from the server so far.

type TestHarness

type TestHarness struct {
	T             *testing.T
	TempDir       string
	BinPath       string
	ConfigPath    string
	MockServerURL string
	Env           map[string]string
	ProjectRoot   string
}

func NewTestHarness

func NewTestHarness(t *testing.T, options HarnessOptions) *TestHarness

func (*TestHarness) AssertAlias

func (h *TestHarness) AssertAlias(toolName, aliasName, expectedCommand string)

func (*TestHarness) AssertAlwaysScriptContains

func (h *TestHarness) AssertAlwaysScriptContains(toolName, content string)

func (*TestHarness) AssertDBOperationLogged

func (h *TestHarness) AssertDBOperationLogged(toolName, opType, filePath string)

Assertions on the persisted SQLite database state

func (*TestHarness) AssertDBToolInstalled

func (h *TestHarness) AssertDBToolInstalled(toolName, version string)

func (*TestHarness) AssertEnvironmentVariable

func (h *TestHarness) AssertEnvironmentVariable(toolName, varName, expectedValue string)

func (*TestHarness) AssertFileContentContains

func (h *TestHarness) AssertFileContentContains(path string, expected string)

func (*TestHarness) AssertFileExists

func (h *TestHarness) AssertFileExists(path string)

Assertions on filesystem and files

func (*TestHarness) AssertOnceScriptContains

func (h *TestHarness) AssertOnceScriptContains(toolName, content string)

func (*TestHarness) AssertShellInitContains

func (h *TestHarness) AssertShellInitContains(shellType string, expected string)

func (*TestHarness) AssertShimExistsAndExecutable

func (h *TestHarness) AssertShimExistsAndExecutable(shimName string)

func (*TestHarness) CopyFixture

func (h *TestHarness) CopyFixture(fixtureName string)

Helper: CopyFixture copies a fixture directory from legacy packages to the sandbox

func (*TestHarness) Generate

func (h *TestHarness) Generate(args ...string) (stdout, stderr string, exitCode int, err error)

func (*TestHarness) Install

func (h *TestHarness) Install(tools []string, args ...string) (stdout, stderr string, exitCode int, err error)

func (*TestHarness) RunCommand

func (h *TestHarness) RunCommand(args ...string) (stdout, stderr string, exitCode int, err error)

Command execution wrappers

func (*TestHarness) Update

func (h *TestHarness) Update(args ...string) (stdout, stderr string, exitCode int, err error)

Jump to

Keyboard shortcuts

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