acceptance

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryFor

func RetryFor(timeout time.Duration, f func(c chan struct{}) error) error

func Run

func Run(t *testing.T, c AccTestCase)

Types

type AccCheck

type AccCheck struct {
	PreExec     func()
	PostExec    func()
	Env         map[string]string
	Args        func() []string
	ShouldRetry ShouldRetryFunc
	Check       func(result *test.ScanResult, stdout string, err error)
}

type AccTestCase

type AccTestCase struct {
	DoNotRunTerraform bool
	TerraformVersion  string
	WorkingDir        string
	Paths             []string
	Args              []string
	OnStart           func()
	OnEnd             func()
	Checks            []AccCheck

	ShouldRefreshBeforeDestroy bool
	RetryDestroy               RetryConfig
	// contains filtered or unexported fields
}

type RetryConfig

type RetryConfig struct {
	Attempts uint8
	Delay    time.Duration
}

type ShouldRetryFunc added in v0.21.0

type ShouldRetryFunc func(result *test.ScanResult, retryDuration time.Duration, retryCount uint8) bool

func LinearBackoff added in v0.21.0

func LinearBackoff(limit time.Duration) ShouldRetryFunc

LinearBackoff returns a function that retries using a back-off strategy of retrying 'n' times and doubling the amount of time waited after each one.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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