Documentation ¶
Index ¶
Constants ¶
const TestAccPrefix = "terraformacc"
TestAccPrefix is the prefix set for all resources created via acceptance testing, so that we can easily identify and clean them up in case of flakiness/failures.
Variables ¶
var TestAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){ "prefect": providerserver.NewProtocol6WithError(TestAccProvider), }
TestAccProtoV6ProviderFactories are used to instantiate a provider during acceptance testing. The factory function will be invoked for every Terraform CLI command executed to create a provider server to which the CLI can reattach.
var TestAccProvider provider.Provider = prefectProvider.New()
TestAccProvider defines the actual Provider, which is used during acceptance testing. This is the same Provider that is used by the CLI, and is used by custom test functions, primarily to access the underlying HTTP client.
Functions ¶
func AccTestPreCheck ¶
AccTestPreCheck is a utility hook, which every test suite will call in order to verify if the necessary provider configurations are passed through the environment variables. https://developer.hashicorp.com/terraform/plugin/testing/acceptance-tests/testcase#precheck
func NewTestClient ¶
func NewTestClient() (api.PrefectClient, error)
NewTestClient returns a new Prefect API client instance to be used in acceptance tests. The plugin-framework does not currently expose a way to extract the provider-configured client - so instead, we duplicate some of the client initiatlization logic that also happens in Provider.Configure(). https://github.com/hashicorp/terraform-plugin-testing/issues/11
Types ¶
This section is empty.