acceptance

package
v1.227.0-test.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package acceptance implements repository-internal acceptance-test orchestration.

Index

Constants

View Source
const (
	TestsPackage       = "github.com/cloudposse/atmos/tests"
	CmdPackage         = "github.com/cloudposse/atmos/cmd"
	ExecPackage        = "github.com/cloudposse/atmos/internal/exec"
	TestHelpersPackage = "github.com/cloudposse/atmos/tests/testhelpers"

	CLICommandsTest = "TestCLICommands"
	RegistryTest    = "TestTerraformRegistryCache"
)

Variables

This section is empty.

Functions

func CollectCoverage

func CollectCoverage(ctx context.Context, options *CoverageOptions, packages, testArgs []string) error

func FindRepoRoot

func FindRepoRoot(start string) (string, error)

func MergeCoverage

func MergeCoverage(ctx context.Context, repoRoot, dataOut, textOut string, inputs []string) error

func MergeCoverageShards

func MergeCoverageShards(ctx context.Context, options CoverageShardOptions) error

func Precompile

func Precompile(ctx context.Context, repoRoot string, target Target, outputDir string) error

func RunShard

func RunShard(ctx context.Context, options *RunOptions) error

func SplitCommandLine

func SplitCommandLine(value string) ([]string, error)

func Verify

func Verify(ctx context.Context, repoRoot string, target Target, shardCount int, binaryDir string) error

Verify checks that the repository's packages, tests, and workflow matrix are assigned exactly once.

Types

type CoverageOptions

type CoverageOptions struct {
	RepoRoot string
	Dir      string
	DataOut  string
	TextOut  string
	Timeout  string
}

CoverageOptions configures native Go coverage collection.

type CoverageShardOptions

type CoverageShardOptions struct {
	RepoRoot  string
	Count     int
	ShardsDir string
	DataOut   string
	TextOut   string
}

CoverageShardOptions configures merging downloaded native coverage artifacts.

type Mode

type Mode string

Mode selects ordinary test execution or native coverage collection.

const (
	ModeTest     Mode = "test"
	ModeCoverage Mode = "coverage"
)

func ParseMode

func ParseMode(value string) (Mode, error)

type RunOptions

type RunOptions struct {
	RepoRoot       string
	Mode           Mode
	Target         Target
	Shard          Shard
	BuildDir       string
	CoverageRoot   string
	GoTestTimeout  string
	CmdTestBinary  string
	TestsBinary    string
	ExecTestBinary string
}

func DefaultRunOptions

func DefaultRunOptions(repoRoot string, mode Mode, target Target, shard Shard) RunOptions

type Shard

type Shard struct {
	Index int
	Count int
}

func ParseShard

func ParseShard(indexValue, countValue string) (Shard, error)

type Target

type Target string

Target identifies the operating system whose acceptance plan is being built.

const (
	TargetLinux   Target = "linux"
	TargetMacOS   Target = "macos"
	TargetWindows Target = "windows"
)

func ParseTarget

func ParseTarget(value string) (Target, error)

Jump to

Keyboard shortcuts

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