scenarios

package
v0.0.0-...-41d7134 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScenarioRegistration

type ScenarioRegistration struct {
	// The name of the scenario. This name should match the value
	// of TEST_SCENARIO environment variable which the test uses
	// to determine the scenario to run.
	Name string

	// The name of the example's folder under the `examples/` directory
	FolderName string

	// List of TF variables that needs to be supplied to the
	// example's terraform config.
	TerraformInputVars TerraformInputVarsHook

	// Validate is the hook called when validations need to be performed on the deployment. This
	// hook will only be called after a successful terraform apply.
	Validate ValidateHook
}

ScenarioRegistration is the struct we expect each individual scenario to use and register themselves by providing valid lifecycle hooks

type ScenarioRegistry

type ScenarioRegistry interface {
	// Register registers a scenario into the registry
	Register(ScenarioRegistration)

	// Retrieve retrieves a scenario from the registry
	Retrieve(name string) (ScenarioRegistration, error)
}

ScenarioRegistry helps us interact with the actual registry that holds details about the scenarios.

func NewScenarioRegistry

func NewScenarioRegistry() ScenarioRegistry

type TerraformInputVarsHook

type TerraformInputVarsHook func() (map[string]interface{}, error)

type ValidateHook

type ValidateHook func(*testing.T, []byte)

Jump to

Keyboard shortcuts

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