testrunner

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package testrunner implements runners for end-to-end and fuzz test suites.

Index

Constants

View Source
const TofuProviderVersion = "0.1.0"

TofuProviderVersion is the version the tofu provider suite builds into the local mirror and the module's `>=0.1.0` constraint resolves to. OpenTofu refuses 0.0.0, which is reserved for a provider that is not published, so the development loop and the suite both use 0.1.0. It is also spelled in test/e2e/tofu/main_test.go, which is what skips the suite when the mirror does not hold it.

Variables

This section is empty.

Functions

func Fuzz

func Fuzz() error

Fuzz replays the fuzz seed corpus under fuzz/...

func RunE2E

func RunE2E(timeout string, pkg string, extra ...string) error

RunE2E builds the binary the suite drives, then runs go test against pkg.

func RunE2ENoBuild

func RunE2ENoBuild(timeout string, pkg string, extra ...string) error

RunE2ENoBuild runs go test against pkg with the temporary directory configured for e2e suites.

func RunE2ETofu added in v0.35.0

func RunE2ETofu() error

RunE2ETofu builds the provider into the filesystem mirror the suite reads, then runs the tofu provider e2e suite.

The mirror is built here rather than by the suite because building it is a release step, not a test one: the same function the development loop calls, producing the same layout a `.tofurc` points at. A suite run without it skips rather than fails, naming the target.

The timeout is generous because the suite stands up three bootloose machines, builds a distro package, installs an engine across them, removes a node and destroys the cluster -- each of those a real apply through the provider's own subprocess.

func StopBootlooseContainers

func StopBootlooseContainers() error

StopBootlooseContainers force-removes leftover bootloose containers.

func Unit

func Unit() error

Unit runs go test over every package except the e2e suites under test/, which need Docker and runners of their own. Those are driven by Test.EndToEnd* instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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