standalone

package
v0.82.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package standalone provides helpers to drive the e2e provisioning framework from standalone (non-test) binaries. It mirrors the provisioning performed by e2e.BaseSuite but without any dependency on *testing.T (see PR #51954), so a plain program can provision an environment, use it, and tear it down.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(ctx common.Context, stackName string, p provisioners.Provisioner) error

Destroy tears down the stack provisioned for stackName using the given provisioner.

func Provision

func Provision[Env any](ctx common.Context, stackName string, p provisioners.Provisioner) (*Env, error)

Provision provisions an environment of type Env using the given provisioner and stack name, imports the resulting resources into the environment, and initializes it. It mirrors the provisioning performed by e2e.BaseSuite, without any dependency on *testing.T.

The returned environment is ready to use (e.g. env.RemoteHost.Execute). Callers are responsible for calling Destroy when done.

Types

type Context

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

Context is a non-test implementation of common.Context, usable from standalone binaries.

func NewContext

func NewContext(outputDir string) *Context

NewContext returns a Context that logs to stderr and stores session output in outputDir.

func (*Context) FailNow

func (c *Context) FailNow(format string, args ...any)

FailNow logs the formatted message and panics, stopping the current goroutine.

func (*Context) Logf

func (c *Context) Logf(format string, args ...any)

Logf logs a formatted message.

func (*Context) SessionOutputDir

func (c *Context) SessionOutputDir() string

SessionOutputDir returns the directory where output files and artifacts are stored.

func (*Context) T

func (c *Context) T() *testing.T

T returns nil: there is no *testing.T outside of tests. The client and component layers no longer call T() (see PR #51954), so a nil value is safe for the provisioning path.

Jump to

Keyboard shortcuts

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