diff --git a/website/docs/plugin/framework/migrating/testing.mdx b/website/docs/plugin/framework/migrating/testing.mdx index 93bf39366..6bfd8a9c1 100644 --- a/website/docs/plugin/framework/migrating/testing.mdx +++ b/website/docs/plugin/framework/migrating/testing.mdx @@ -38,7 +38,11 @@ and then verify that there are no planned changes after migrating to the Framewo - The first `TestStep` uses `ExternalProviders` to cause `terraform apply` to execute with a previous version of the provider, which is built on SDKv2. - The second `TestStep` uses `ProtoV5ProviderFactories` so that the test uses the provider code contained within the -http provider repository. The second step also uses `PlanOnly` to verify that a no-op plan is generated. +provider repository. The second step also uses `PlanOnly` to verify that a no-op plan is generated. + + +The following is only applicable to managed resources. + ```go func TestDataSource_UpgradeFromVersion(t *testing.T) { @@ -52,17 +56,17 @@ func TestDataSource_UpgradeFromVersion(t *testing.T) { Source: "hashicorp/", }, }, - Config: `data "provider_datasource" "example" { + Config: `resource "provider_resource" "example" { /* ... */ }`, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr("data.provider_datasource.example", "", ""), + resource.TestCheckResourceAttr("provider_resource.example", "", ""), /* ... */ ), }, { ProtoV5ProviderFactories: protoV5ProviderFactories(), - Config: `data "provider_datasource" "example" { + Config: `resource "provider_resource" "example" { /* ... */ }`, PlanOnly: true,