Documentation ¶
Index ¶
- Constants
- Variables
- func AssertInstanceReboot(t *testing.T, shouldRestart bool, instance *linodego.Instance) func()
- func CheckEventAbsent(name string, entityType linodego.EntityType, action linodego.EventAction) resource.TestCheckFunc
- func CheckFirewallExists(name string, firewall *linodego.Firewall) resource.TestCheckFunc
- func CheckInstanceDestroy(s *terraform.State) error
- func CheckInstanceExists(name string, instance *linodego.Instance) resource.TestCheckFunc
- func CheckLKEClusterDestroy(s *terraform.State) error
- func CheckListContains(resName, path, value string) resource.TestCheckFunc
- func CheckMySQLDatabaseExists(name string, db *linodego.MySQLDatabase) resource.TestCheckFunc
- func CheckPostgresDatabaseExists(name string, db *linodego.PostgresDatabase) resource.TestCheckFunc
- func CheckResourceAttrContains(resName string, path, desiredValue string) resource.TestCheckFunc
- func CheckResourceAttrGreaterThan(resName, path string, target int) resource.TestCheckFunc
- func CheckResourceAttrListContains(resName, path, desiredValue string) resource.TestCheckFunc
- func CheckResourceAttrNotEqual(resName string, path, notValue string) resource.TestCheckFunc
- func CheckVolumeDestroy(s *terraform.State) error
- func CheckVolumeExists(name string, volume *linodego.Volume) resource.TestCheckFunc
- func CreateTempFile(t *testing.T, name, content string) *os.File
- func CreateTestProvider() (*schema.Provider, map[string]*schema.Provider)
- func ExecuteTemplate(t *testing.T, templateName string, data interface{}) string
- func GetRandomOBJCluster() (string, error)
- func GetRandomRegionWithCaps(capabilities []string, filters ...RegionFilterFunc) (string, error)
- func GetRegionsWithCaps(capabilities []string, filters ...RegionFilterFunc) ([]string, error)
- func GetSSHClient(t *testing.T, user, addr string) (client *ssh.Client)
- func GetTestClient() (*linodego.Client, error)
- func LongRunningTest(t *testing.T)
- func LoopThroughStringList(resName, path string, listValidateFunc ListAttrValidateFunc) resource.TestCheckFunc
- func ModifyProviderMeta(provider *schema.Provider, modifier ProviderMetaModifier)
- func OptInTest(t *testing.T)
- func PreCheck(t *testing.T)
- func RunTestRetry(t *testing.T, maxAttempts int, f func(t *TRetry))
- func ShouldSweep(prefix, name string) bool
- func SweeperListOptions(prefix, field string) *linodego.ListOptions
- func TestMain(m *testing.M)
- func TestProvider(t *testing.T)
- func ValidateResourceAttr(resName, path string, comparisonFunc AttrValidateFunc) resource.TestCheckFunc
- type AttrValidateFunc
- type ListAttrValidateFunc
- type ProviderMetaModifier
- type RegionFilterFunc
- type TRetry
- func (t *TRetry) Cleanup(f func())
- func (t *TRetry) Close()
- func (t *TRetry) Error(args ...any)
- func (t *TRetry) Errorf(format string, args ...any)
- func (t *TRetry) Fail()
- func (t *TRetry) FailNow()
- func (t *TRetry) Failed() bool
- func (t *TRetry) Fatal(args ...any)
- func (t *TRetry) Fatalf(format string, args ...any)
- func (t *TRetry) Helper()
- func (t *TRetry) Log(args ...any)
- func (t *TRetry) Logf(format string, args ...any)
- func (t *TRetry) Name() string
- func (t *TRetry) Parallel()
- func (t *TRetry) Setenv(key, value string)
- func (t *TRetry) Skip(args ...any)
- func (t *TRetry) SkipNow()
- func (t *TRetry) Skipf(format string, args ...any)
- func (t *TRetry) Skipped() bool
- func (t *TRetry) TempDir() string
Constants ¶
View Source
const (
SkipInstanceReadyPollKey = "skip_instance_ready_poll"
)
Variables ¶
View Source
var ( PublicKeyMaterial string TestAccProviders map[string]*schema.Provider TestAccProvider *schema.Provider TestAccFrameworkProvider *linode.FrameworkProvider ConfigTemplates *template.Template TestImageLatest string TestImagePrevious string )
View Source
var ProtoV5ProviderFactories = map[string]func() (tfprotov5.ProviderServer, error){ "linode": func() (tfprotov5.ProviderServer, error) { ctx := context.Background() providers := []func() tfprotov5.ProviderServer{ TestAccProviders["linode"].GRPCProvider, providerserver.NewProtocol5( TestAccFrameworkProvider, ), } muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) if err != nil { return nil, err } return muxServer.ProviderServer(), nil }, }
Functions ¶
func AssertInstanceReboot ¶
func CheckEventAbsent ¶
func CheckEventAbsent(name string, entityType linodego.EntityType, action linodego.EventAction) resource.TestCheckFunc
func CheckFirewallExists ¶
func CheckFirewallExists(name string, firewall *linodego.Firewall) resource.TestCheckFunc
func CheckInstanceDestroy ¶
func CheckInstanceExists ¶
func CheckInstanceExists(name string, instance *linodego.Instance) resource.TestCheckFunc
func CheckLKEClusterDestroy ¶
func CheckListContains ¶
func CheckListContains(resName, path, value string) resource.TestCheckFunc
CheckListContains checks whether a state list or set contains a given value
func CheckMySQLDatabaseExists ¶
func CheckMySQLDatabaseExists(name string, db *linodego.MySQLDatabase) resource.TestCheckFunc
func CheckPostgresDatabaseExists ¶
func CheckPostgresDatabaseExists(name string, db *linodego.PostgresDatabase) resource.TestCheckFunc
func CheckResourceAttrContains ¶
func CheckResourceAttrContains(resName string, path, desiredValue string) resource.TestCheckFunc
func CheckResourceAttrGreaterThan ¶
func CheckResourceAttrGreaterThan(resName, path string, target int) resource.TestCheckFunc
func CheckResourceAttrListContains ¶
func CheckResourceAttrListContains(resName, path, desiredValue string) resource.TestCheckFunc
func CheckResourceAttrNotEqual ¶
func CheckResourceAttrNotEqual(resName string, path, notValue string) resource.TestCheckFunc
func CheckVolumeDestroy ¶
func CheckVolumeExists ¶
func CheckVolumeExists(name string, volume *linodego.Volume) resource.TestCheckFunc
func ExecuteTemplate ¶
func GetRandomOBJCluster ¶
GetRandomOBJCluster gets a random Object Storage cluster.
func GetRandomRegionWithCaps ¶
func GetRandomRegionWithCaps(capabilities []string, filters ...RegionFilterFunc) (string, error)
GetRandomRegionWithCaps gets a random region given a list of region capabilities.
func GetRegionsWithCaps ¶
func GetRegionsWithCaps(capabilities []string, filters ...RegionFilterFunc) ([]string, error)
GetRegionsWithCaps returns a list of regions that support the given capabilities.
func GetTestClient ¶
func LongRunningTest ¶
func LoopThroughStringList ¶
func LoopThroughStringList(resName, path string, listValidateFunc ListAttrValidateFunc) resource.TestCheckFunc
func ModifyProviderMeta ¶
func ModifyProviderMeta(provider *schema.Provider, modifier ProviderMetaModifier)
func RunTestRetry ¶
RunTestRetry attempts to retry the given test if an intermittent error occurs. This function wraps the given testing.T and handles errors accordingly. This should only be used for flapping API tests.
func ShouldSweep ¶
func SweeperListOptions ¶
func SweeperListOptions(prefix, field string) *linodego.ListOptions
func TestProvider ¶
func ValidateResourceAttr ¶
func ValidateResourceAttr(resName, path string, comparisonFunc AttrValidateFunc) resource.TestCheckFunc
Types ¶
type AttrValidateFunc ¶
type ListAttrValidateFunc ¶
type ProviderMetaModifier ¶
type ProviderMetaModifier func(ctx context.Context, config *helper.ProviderMeta) error
type RegionFilterFunc ¶ added in v2.13.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.