lifecycletest

package
v2.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneSnapshot

func CloneSnapshot(t *testing.T, snap *deploy.Snapshot) *deploy.Snapshot

CloneSnapshot makes a deep copy of the given snapshot and returns a pointer to the clone.

Types

type TestOp

type TestOp func(UpdateInfo, *Context, UpdateOptions, bool) (ResourceChanges, result.Result)

func ImportOp added in v2.14.0

func ImportOp(imports []deploy.Import) TestOp

func (TestOp) Run

func (op TestOp) Run(project workspace.Project, target deploy.Target, opts UpdateOptions,
	dryRun bool, backendClient deploy.BackendClient, validate ValidateFunc) (*deploy.Snapshot, result.Result)

func (TestOp) RunWithContext

func (op TestOp) RunWithContext(
	callerCtx context.Context, project workspace.Project,
	target deploy.Target, opts UpdateOptions, dryRun bool,
	backendClient deploy.BackendClient, validate ValidateFunc) (*deploy.Snapshot, result.Result)

type TestPlan

type TestPlan struct {
	Project        string
	Stack          string
	Runtime        string
	RuntimeOptions map[string]interface{}
	Config         config.Map
	Decrypter      config.Decrypter
	BackendClient  deploy.BackendClient
	Options        UpdateOptions
	Steps          []TestStep
}

func (*TestPlan) GetProject

func (p *TestPlan) GetProject() workspace.Project

func (*TestPlan) GetTarget

func (p *TestPlan) GetTarget(snapshot *deploy.Snapshot) deploy.Target

func (*TestPlan) NewProviderURN

func (p *TestPlan) NewProviderURN(pkg tokens.Package, name string, parent resource.URN) resource.URN

func (*TestPlan) NewURN

func (p *TestPlan) NewURN(typ tokens.Type, name string, parent resource.URN) resource.URN

func (*TestPlan) Run

func (p *TestPlan) Run(t *testing.T, snapshot *deploy.Snapshot) *deploy.Snapshot

type TestStep

type TestStep struct {
	Op            TestOp
	ExpectFailure bool
	SkipPreview   bool
	Validate      ValidateFunc
}

func MakeBasicLifecycleSteps

func MakeBasicLifecycleSteps(t *testing.T, resCount int) []TestStep

type ValidateFunc

type ValidateFunc func(project workspace.Project, target deploy.Target, entries JournalEntries,
	events []Event, res result.Result) result.Result

Jump to

Keyboard shortcuts

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