testing

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestDataSourcePlugin added in v0.2.0

func NewTestDataSourcePlugin(ctx context.Context, config TestDataSourcePluginConfig) (apiv1.DataSourcePlugin, error)

NewTestDataSourcePlugin is a helper util to load a plugin using the engine that will use the terraform provider. In the sense of an acceptance/integration test.

This has benefits over loading the plugin directly with Go, by using this method you will be sure that what is executed is what the terraform provider will execute, so, if you use a not supported feature or the engine has a bug, this will be detected on the tests instead by running Terraform directly.

Note: All plugin files must be at one dir depth level, this is by design on the provider.

func NewTestResourcePlugin

func NewTestResourcePlugin(ctx context.Context, config TestResourcePluginConfig) (apiv1.ResourcePlugin, error)

NewTestResourcePlugin is a helper util to load a plugin using the engine that will use the terraform provider. In the sense of an acceptance/integration test.

This has benefits over loading the plugin directly with Go, by using this method you will be sure that what is executed is what the terraform provider will execute, so, if you use a not supported feature or the engine has a bug, this will be detected on the tests instead by running Terraform directly.

Note: All plugin files must be at one dir depth level, this is by design on the provider.

Types

type TestDataSourcePluginConfig added in v0.4.0

type TestDataSourcePluginConfig struct {
	PluginDir           string
	PluginFactoryName   string
	PluginConfiguration string
}

type TestResourcePluginConfig added in v0.4.0

type TestResourcePluginConfig struct {
	PluginDir           string
	PluginFactoryName   string
	PluginConfiguration string
}

Jump to

Keyboard shortcuts

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