Documentation ¶
Index ¶
- Constants
- Variables
- func PreCheck(t *testing.T)
- func PreCheckAPIExtensions(t *testing.T, extensions ...string)
- func PreCheckClustering(t *testing.T)
- func PreCheckIncusVersion(t *testing.T, versionConstraint string)
- func PreCheckVirtualization(t *testing.T)
- func PrintResourceState(t *testing.T, resName string) resource.TestCheckFunc
Constants ¶
const TestImage = "images:alpine/edge/amd64"
TestImage is a constant that specifies the default image used in all tests.
Variables ¶
var ProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){ "incus": providerserver.NewProtocol6WithError(provider.NewIncusProvider("test")()), }
ProtoV6ProviderFactories 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.
Functions ¶
func PreCheck ¶
PreCheck is a precheck that ensures test requirements, such as existing environment variables, are met. It should be included in every acc test.
func PreCheckAPIExtensions ¶
PreCheckAPIExtensions skips the test if the Incus server does not support the required extensions.
func PreCheckClustering ¶
PreCheckClustering skips the test if Incus server is not running in clustered mode.
func PreCheckIncusVersion ¶
PreCheckIncusVersion skips the test if the server's version does not satisfy the provided version constraints. The version constraints are detailed at: https://pkg.go.dev/github.com/hashicorp/go-version#readme-version-constraints
func PreCheckVirtualization ¶
PreCheckVirtualization skips the test if the Incus server does not support virtualization.
func PrintResourceState ¶
func PrintResourceState(t *testing.T, resName string) resource.TestCheckFunc
PrintResourceState is a test check function that prints the entire state of a resource with the given name. This check should be used only for debuging purposes.
Example resource name: incus_profile.profile2
Types ¶
This section is empty.