-
Notifications
You must be signed in to change notification settings - Fork 14
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
Migrate Testing Provider Code to terraform-plugin-go #151
Milestone
Comments
bflad
added a commit
that referenced
this issue
Aug 22, 2023
Reference: #151 Creates an internal terraform-plugin-go based SDK and declarative provider for unit testing for within this Go module. The new `helper/resource` tests should be equivalent to the existing terraform-plugin-sdk based `TestTest_TestStep_ExternalProviders_To_ProviderFactories` and `TestTest_TestStep_ProviderFactories_To_ExternalProviders` tests.
bflad
added a commit
that referenced
this issue
Aug 25, 2023
Reference: #151 Creates an internal terraform-plugin-go based SDK and declarative provider for unit testing for within this Go module. The new `helper/resource` tests should be equivalent to the existing terraform-plugin-sdk based `TestTest_TestStep_ExternalProviders_To_ProviderFactories` and `TestTest_TestStep_ProviderFactories_To_ExternalProviders` tests.
bflad
added a commit
that referenced
this issue
Aug 28, 2023
Reference: #151 This will reduce CI time and dependency on networking/registry calls.
bflad
added a commit
that referenced
this issue
Aug 28, 2023
Reference: #151 This will reduce CI time and dependency on networking/registry calls.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
In order to appropriately (unit) test the functionality offered to provider developers with
helper/resource.TestCase
and friends, it generally requires the need for real provider implementations. Currently, some of the tests utilize the lingering direct dependency on terraform-plugin-sdk. For example:A long term goal of this Go module would be to remove that direct dependency, which is only based on supporting the legacy
Providers
andProviderFactories
fields which work with theterraform-plugin-sdk/helper/schema.Provider
type.Other tests rely on downloading real providers, such as
hashicorp/random
that happen to include the desired functionality for testing.Proposal
The summary of this proposal is:
hashicorp/random
etc., can and should still be used for testingExternalProviders
field functionality, but not in other cases. Migrate those other cases to the terraform-plugin-go equivalent.Some additional notes/assumptions:
Create
,Read
, etc. methods.tftypes
type system to reduce complexity in that area.The text was updated successfully, but these errors were encountered: