framework

package
v0.0.0-...-de9f2de Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, ts tuningset.TuningSet, action tuningset.Action, sink measurement.Sink) []error

Execute runs the given action for every sequence number yielded by the TuningSet. Execute blocks until all actions complete and returns all collected errors.

Types

type Capability

type Capability string

Capability identifies a requirement that a load test has on the test environment. Pass one or more capabilities to Require() to declare which environment variables must be set.

var (
	// KCPFrontProxyKubeconfig declares that the test requires the
	// FRONTPROXY_KUBECONFIG env var to be set.
	KCPFrontProxyKubeconfig Capability = "FRONTPROXY_KUBECONFIG"

	// KCPShardKubeconfig declares that the test requires the
	// SHARD_KUBECONFIG env var to be set.
	KCPShardKubeconfig Capability = "SHARD_KUBECONFIG"
)

type Config

type Config struct {
	// FrontProxyKubeconfig is the rest.Config of a kcp front-proxy
	FrontProxyKubeconfig *rest.Config

	// ShardKubeconfig is the rest.Config of a kcp shard
	ShardKubeconfig *rest.Config
}

Config holds the resolved configuration based on the capabilities requested in Require. Only fields corresponding to requested capabilities are guaranteed to be populated.

func Require

func Require(t *testing.T, caps ...Capability) *Config

Require validates that all environment variables required by the given capabilities have been provided and returns a Config populated with the corresponding values. It calls t.Fatal if any required env var is missing or a kubeconfig cannot be loaded.

Jump to

Keyboard shortcuts

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