acctest

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName = "inext"
)

Variables

View Source
var Provider *schema.Provider

Provider is the "main" provider instance

This Provider can be used in testing code for API calls without requiring the use of saving and referencing specific ProviderFactories instances.

PreCheck(t) must be called before using this provider instance.

View Source
var ProviderFactories map[string]func() (*schema.Provider, error)

ProviderFactories is a static map containing only the main provider instance

Use other ProviderFactories functions, such as FactoriesAlternate, for tests requiring special provider configurations.

Functions

func CheckResourceDestroyed

func CheckResourceDestroyed(resourcesNames []string) resource.TestCheckFunc

func ComposeTestCheckResourceAttrsFromMap

func ComposeTestCheckResourceAttrsFromMap(resourceName string, attributesWithValues map[string]string) []resource.TestCheckFunc

func GenerateResourceName

func GenerateResourceName() string

func MustReadFile

func MustReadFile(path string) string

func PreCheck

func PreCheck(t *testing.T)

PreCheck verifies and sets required provider testing configuration

This PreCheck function should be present in every acceptance test. It allows test configurations to omit a provider configuration with region and ensures testing functions that attempt to call AWS APIs are previously configured.

These verifications and configuration are preferred at this level to prevent provider developers from experiencing less clear errors for every test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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