Skip to content
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

Opt in to new SDK binary acceptance testing driver #1005

Closed
kmoe opened this issue Mar 26, 2020 · 1 comment
Closed

Opt in to new SDK binary acceptance testing driver #1005

kmoe opened this issue Mar 26, 2020 · 1 comment

Comments

@kmoe
Copy link
Contributor

kmoe commented Mar 26, 2020

Requires #1001

Fixes hashicorp/terraform-plugin-sdk#153, hashicorp/terraform-plugin-sdk#118, hashicorp/terraform-plugin-sdk#114

Versions 1.7.0 and later of the Terraform plugin SDK allow providers to opt in to a new driver for the acceptance tests, which runs tests using the terraform binary instead of a vendored copy of Terraform Core, while remaining as backwards-compatible as possible.

This test driver fixes a number of existing issues with the legacy test driver.

For more information, please see hashicorp/terraform-plugin-sdk#262, and for an example provider migration please see hashicorp/terraform-provider-random#99.

This feature is released as an opt-in preview in version 1 of the SDK, and will be mandatory from version 2. We do not plan to change the API, and encourage providers to enable the binary test driver now. This can be done by adding a small TestMain block to the provider test as described in hashicorp/terraform-plugin-sdk#262:

func TestMain(m *testing.M) {
	acctest.UseBinaryDriver("oci", Provider)
	resource.TestMain(m)
}

No other changes are needed in most cases to for the new driver to be enabled during local acceptance test runs, and the SDK team is ready to assist with the one-time changes needed to TeamCity build configurations.

@parrneet
Copy link
Contributor

Acknowledged and is in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants