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(provider *schema.Provider, 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 CheckMongoDatabaseExists(name string, db *linodego.MongoDatabase) 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 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 GetClientForSweepers() (*linodego.Client, error)
- func GetRandomOBJCluster() (string, error)
- func GetRandomRegionWithCaps(capabilities []string) (string, error)
- func GetRegionsWithCaps(capabilities []string) ([]string, error)
- func GetSSHClient(t *testing.T, user, addr string) (client *ssh.Client)
- 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 ProviderMetaModifier
- 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 ¶
Functions ¶
func AssertInstanceReboot ¶
func CheckEventAbsent ¶ added in v1.25.0
func CheckEventAbsent(name string, entityType linodego.EntityType, action linodego.EventAction) resource.TestCheckFunc
func CheckFirewallExists ¶ added in v1.25.0
func CheckInstanceDestroy ¶
func CheckInstanceExists ¶
func CheckInstanceExists(name string, instance *linodego.Instance) resource.TestCheckFunc
func CheckLKEClusterDestroy ¶
func CheckMongoDatabaseExists ¶ added in v1.28.0
func CheckMongoDatabaseExists(name string, db *linodego.MongoDatabase) resource.TestCheckFunc
func CheckMySQLDatabaseExists ¶ added in v1.28.0
func CheckMySQLDatabaseExists(name string, db *linodego.MySQLDatabase) resource.TestCheckFunc
func CheckPostgresDatabaseExists ¶ added in v1.28.0
func CheckPostgresDatabaseExists(name string, db *linodego.PostgresDatabase) resource.TestCheckFunc
func CheckResourceAttrContains ¶ added in v1.23.0
func CheckResourceAttrContains(resName string, path, desiredValue string) resource.TestCheckFunc
func CheckResourceAttrGreaterThan ¶ added in v1.23.0
func CheckResourceAttrGreaterThan(resName, path string, target int) 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 CreateTempFile ¶ added in v1.26.0
func CreateTestProvider ¶ added in v1.28.0
func ExecuteTemplate ¶
func GetClientForSweepers ¶
func GetRandomOBJCluster ¶ added in v1.29.3
GetRandomOBJCluster gets a random Object Storage cluster.
func GetRandomRegionWithCaps ¶ added in v1.29.3
GetRandomRegionWithCaps gets a random region given a list of region capabilities.
func GetRegionsWithCaps ¶ added in v1.29.3
GetRegionsWithCaps returns a list of regions that support the given capabilities.
func ModifyProviderMeta ¶ added in v1.28.0
func ModifyProviderMeta(provider *schema.Provider, modifier ProviderMetaModifier)
func RunTestRetry ¶ added in v1.29.2
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 ¶ added in v1.23.0
func ValidateResourceAttr(resName, path string, comparisonFunc AttrValidateFunc) resource.TestCheckFunc
Types ¶
type AttrValidateFunc ¶ added in v1.23.0
type ProviderMetaModifier ¶ added in v1.28.0
type ProviderMetaModifier func(ctx context.Context, config *helper.ProviderMeta) error
Click to show internal directories.
Click to hide internal directories.