Documentation
¶
Index ¶
- Constants
- func CurrentProviderConfigBlock() tfbuild.FileElement
- func Initialize(m *testing.M) error
- func ProviderConfigBlock(c ConfigTargetConfig) tfbuild.FileElement
- func ProviderConfigBlockSshPasswordAuth(c ConfigTargetConfig) tfbuild.FileElement
- func ProviderFactories() providerFactoryMap
- func ProviderResourceConfig(c ConfigTargetConfig) *terraform.ResourceConfig
- func RelevantForOS(t *testing.T, target Target, ids ...string)
- func SkipNotImplemented(t *testing.T)
- func SkipWhenOSEquals(t *testing.T, target Target, ids ...string)
- func SkipWhenOSNotEquals(t *testing.T, target Target, ids ...string)
- type AccTest
- type Config
- type ConfigSsh
- type ConfigTarget
- type ConfigTargetConfig
- type ConfigTargetConfigMap
- type ConfigTargetOs
- type EnvConfig
- type Target
- type Targets
Constants ¶
View Source
const ( EnvTfProviderSystemTargets = EnvPrefix + "TARGETS" EnvTfProviderSystemConfigPath = EnvPrefix + "CONFIG_PATH" )
View Source
const ( // EnvTfAcc refers to the TF_ACC environment variable EnvTfAcc = "TF_ACC" // EnvTfLog refers to the TF_LOG environment variable // https://www.terraform.io/plugin/log/managing#enable-logging EnvTfLog = "TF_LOG" // EnvTfAccTerraformPath refers to the TF_ACC_TERRAFORM_PATH environment variable EnvTfAccTerraformPath = "TF_ACC_TERRAFORM_PATH" )
Environment variables defined by the Terraform acceptance test framework https://www.terraform.io/plugin/sdkv2/testing/acceptance-tests#environment-variables
View Source
const (
DefaultTargetConfigId = "default"
)
View Source
const ( // EnvPrefix is the prefix for all environment variables which are used to configure the acceptance tests // EnvPrefix is intentionally *different* from provider.Schema because different acceptance tests may test different provider configurations EnvPrefix = "TF_ACC_PROVIDER_SYSTEM_" )
Variables ¶
This section is empty.
Functions ¶
func CurrentProviderConfigBlock ¶
func CurrentProviderConfigBlock() tfbuild.FileElement
CurrentProviderConfigBlock returns the current configuration as a Terraform provider block Deprecated
func Initialize ¶
func ProviderConfigBlock ¶
func ProviderConfigBlock(c ConfigTargetConfig) tfbuild.FileElement
ProviderConfigBlock is currently an alias for ProviderConfigBlockSshPasswordAuth
func ProviderConfigBlockSshPasswordAuth ¶
func ProviderConfigBlockSshPasswordAuth(c ConfigTargetConfig) tfbuild.FileElement
ProviderConfigBlockSshPasswordAuth returns a provider configuration which uses ssh password authentication
func ProviderFactories ¶
func ProviderFactories() providerFactoryMap
ProviderFactories returns the provider factories used in the acceptance tests
func ProviderResourceConfig ¶
func ProviderResourceConfig(c ConfigTargetConfig) *terraform.ResourceConfig
func SkipNotImplemented ¶
Types ¶
type AccTest ¶
type Config ¶
type Config struct {
Targets map[string]ConfigTarget `yaml:"targets"`
}
type ConfigTarget ¶
type ConfigTarget struct { Os ConfigTargetOs `yaml:"os"` Configs ConfigTargetConfigMap `yaml:"configs"` }
type ConfigTargetConfig ¶
type ConfigTargetConfig struct {
Ssh ConfigSsh `yaml:"ssh"`
}
type ConfigTargetConfigMap ¶
type ConfigTargetConfigMap map[string]ConfigTargetConfig
func (ConfigTargetConfigMap) Default ¶
func (m ConfigTargetConfigMap) Default() ConfigTargetConfig
func (ConfigTargetConfigMap) Get ¶
func (m ConfigTargetConfigMap) Get(id string) (ConfigTargetConfig, error)
func (ConfigTargetConfigMap) MustGet ¶
func (m ConfigTargetConfigMap) MustGet(id string) ConfigTargetConfig
type ConfigTargetOs ¶
type EnvConfig ¶
type EnvConfig struct { // Targets is a list of target identifiers to include in the acceptance test run Targets []string `env:"TARGETS"` // ConfigPath is the path to the config yaml ConfigPath string `env:"CONFIG_PATH,default=acctest.yaml"` }
EnvConfig represents the acceptance test configuration which is provided by environment variables
Source Files
¶
Click to show internal directories.
Click to hide internal directories.