-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SkipFunc and more helpful errors for Terraform versions during testing #68
Comments
I'd love to see this too. I need to selectively skip acc tests based on TF version. I our case, this would have to be available via terraform-plugin-test / terraform-plugin-go |
Hi folks 👋 With the introduction of the terraform-plugin-testing module (migration guide), we are transferring feature requests relating to the Thanks again for this feature request. |
Since We could consider creating something like: type TerraformVersionFunc func(version.Version) (bool, error) // returns: whether to t.Skip(), error
type TestCase struct {
TerraformVersion TerraformVersionFunc
} If defined, this could enable the testing code to explicitly execute
Where those version constraints could be written with helpers such as:
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
ProtoV6ProviderFactories
added in hashicorp/terraform-plugin-sdk#761 requires Terraform v0.15.4 or later. Using earlier versions of Terraform will result in an unhelpful error from the Terraform CLI.Check the Terraform version being used during acc testing and give a helpful error if incompatible provider factory versions are used.
Also provide a built-in SkipFunc for skipping tests based on Terraform versions.
The text was updated successfully, but these errors were encountered: