testhelpers

package
v1.193.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtmosRunner

type AtmosRunner struct {
	// contains filtered or unexported fields
}

AtmosRunner manages running Atmos with optional coverage collection.

func NewAtmosRunner

func NewAtmosRunner(coverDir string) *AtmosRunner

NewAtmosRunner creates a runner that always builds Atmos, with or without coverage instrumentation.

func (*AtmosRunner) BinaryPath

func (r *AtmosRunner) BinaryPath() string

BinaryPath returns the path to the binary being used.

func (*AtmosRunner) Build

func (r *AtmosRunner) Build() error

Build always builds Atmos, with or without coverage instrumentation.

func (*AtmosRunner) Cleanup

func (r *AtmosRunner) Cleanup()

Cleanup removes temporary binary.

func (*AtmosRunner) Command

func (r *AtmosRunner) Command(args ...string) *exec.Cmd

Command creates an exec.Cmd with GOCOVERDIR set.

func (*AtmosRunner) CommandContext

func (r *AtmosRunner) CommandContext(ctx context.Context, args ...string) *exec.Cmd

CommandContext creates an exec.Cmd with context and GOCOVERDIR.

type SandboxEnvironment

type SandboxEnvironment struct {
	TempDir         string
	ComponentsPath  string
	OriginalWorkdir string
	// contains filtered or unexported fields
}

SandboxEnvironment holds the state for a sandboxed test.

func SetupSandbox

func SetupSandbox(t *testing.T, workdir string) (*SandboxEnvironment, error)

SetupSandbox creates an isolated test environment with copied components.

func (*SandboxEnvironment) Cleanup

func (s *SandboxEnvironment) Cleanup()

Cleanup removes the sandbox directory.

func (*SandboxEnvironment) GetEnvironmentVariables

func (s *SandboxEnvironment) GetEnvironmentVariables() map[string]string

GetEnvironmentVariables returns environment variables for sandbox execution.

Jump to

Keyboard shortcuts

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