test

package
v4.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sleep

func Sleep(t *testing.T, amount time.Duration) func()

func TestCheckTypeSetElemAttr

func TestCheckTypeSetElemAttr(name, attr, value string) resource.TestCheckFunc

TestCheckTypeSetElemAttr is a resource.TestCheckFunc that accepts a resource name, an attribute path, which should use the sentinel value '*' for indexing into a TypeSet. The function verifies that an element matches the provided value.

Use this function over SDK provided TestCheckFunctions when validating a TypeSet where its elements are a simple value

func TestCheckTypeSetElemAttrPair

func TestCheckTypeSetElemAttrPair(nameFirst, keyFirst, nameSecond, keySecond string) resource.TestCheckFunc

TestCheckTypeSetElemAttrPair is a TestCheckFunc that verifies a pair of name/key combinations are equal where the first uses the sentinel value to index into a TypeSet.

E.g., tfawsresource.TestCheckTypeSetElemAttrPair("aws_autoscaling_group.bar", "availability_zones.*", "data.aws_availability_zones.available", "names.0")

Types

type TestConfig

type TestConfig struct{}

func NewTestConfig

func NewTestConfig() *TestConfig

func (*TestConfig) Get

func (t *TestConfig) Get(keys ...TestConfigKey) (val string)

func (*TestConfig) GetAnyOrganizationOrSkip

func (t *TestConfig) GetAnyOrganizationOrSkip(testing *testing.T) (val string)

func (*TestConfig) GetEmailOrSkip

func (t *TestConfig) GetEmailOrSkip(testing *testing.T) (val string)

func (*TestConfig) GetNonAdminUserOrAbort

func (t *TestConfig) GetNonAdminUserOrAbort(testing *testing.T) (val string)

func (*TestConfig) GetOrAbort

func (t *TestConfig) GetOrAbort(testing *testing.T, keys ...TestConfigKey) (val string)

func (*TestConfig) GetOrSkip

func (t *TestConfig) GetOrSkip(testing *testing.T, keys ...TestConfigKey) (val string)

func (*TestConfig) GetOrganizationOrAbort

func (t *TestConfig) GetOrganizationOrAbort(testing *testing.T) (val string)

func (*TestConfig) GetOrganizationOrSkip

func (t *TestConfig) GetOrganizationOrSkip(testing *testing.T) (val string)

func (*TestConfig) GetPipelineIDorSkip

func (t *TestConfig) GetPipelineIDorSkip(testing *testing.T) (val string)

func (*TestConfig) GetSlugIDOrAbort

func (t *TestConfig) GetSlugIDOrAbort(testing *testing.T) (val string)

func (*TestConfig) GetSlugIDOrSkip

func (t *TestConfig) GetSlugIDOrSkip(testing *testing.T) (val string)

func (*TestConfig) GetSpaceOrganizationOrSkip

func (t *TestConfig) GetSpaceOrganizationOrSkip(testing *testing.T) (val string)

func (*TestConfig) GetTeamOrSkip

func (t *TestConfig) GetTeamOrSkip(testing *testing.T) (val string)

func (*TestConfig) GetUserIDOrSkip

func (t *TestConfig) GetUserIDOrSkip(testing *testing.T) (val string)

func (*TestConfig) GetUserOrAbort

func (t *TestConfig) GetUserOrAbort(testing *testing.T) (val string)

func (*TestConfig) GetUserOrSkip

func (t *TestConfig) GetUserOrSkip(testing *testing.T) (val string)

func (*TestConfig) SkipUnlessAccTest

func (t *TestConfig) SkipUnlessAccTest(testing *testing.T)

type TestConfigKey

type TestConfigKey int
const (
	TestConfigUserKey TestConfigKey = iota
	TestConfigAcceptanceTestKey
	TestConfigNonAdminUserKey
	TestConfigAPIKey
	TestConfigOrganizationKey
	TestConfigSpaceOrganizationKey
	TestConfigSlugIDKey
	TestConfigEmail
	TestConfigTeam
	TestConfigUserID
	TestConfigPipelineID
)

func (TestConfigKey) String

func (k TestConfigKey) String() (name string)

Jump to

Keyboard shortcuts

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