Skip to content

chore: migrate to hashicorp/terraform-plugin-testing#538

Merged
tenthirtyam merged 1 commit intomainfrom
chore/migrate-to-terraform-plugin-testing
Apr 24, 2025
Merged

chore: migrate to hashicorp/terraform-plugin-testing#538
tenthirtyam merged 1 commit intomainfrom
chore/migrate-to-terraform-plugin-testing

Conversation

@tenthirtyam
Copy link
Copy Markdown
Contributor

Summary

Migrate a provider's acceptance tests from the legacy SDKv2 to the testing module, github.com/hashicorp/terraform-plugin-testing:

  • github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest >>> github.com/hashicorp/terraform-plugin-testing/helper/acctest
  • github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource >>> github.com/hashicorp/terraform-plugin-testing/helper/resource
  • github.com/hashicorp/terraform-plugin-sdk/v2/terraform >>> github.com/hashicorp/terraform-plugin-testing/terraform

Reference: Migrating from SDK

Type

  • This is a bug fix.
  • This is an enhancement or feature.
  • This is a code style/formatting update.
  • This is a documentation update.
  • This is a refactoring update.
  • This is a chore update
  • This is something else.
    Please describe:

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

Test and Documentation

  • Tests have been completed.
  • Documentation has been added or updated.
terraform-provider-tanzu-mission-control1 on  chore/migrate-to-terraform-plugin-testing [!] via 🐹 v1.24.2 took 21.8s 
✦ ➜ go test -count=1 $(find . -name "*_test.go" -print0 | xargs -0 -n1 dirname)
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackageinstall       0.964s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackageinstall/spec  0.386s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackageinstall/scope 1.539s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackageinstall/status        1.903s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/credential        3.727s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/cluster/nodepools 2.976s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/cluster   2.666s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/cluster/tkgaws    4.159s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/cluster/common    4.519s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/cluster/tkgvsphere        3.363s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/cluster/tkgservicevsphere 4.912s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmfeature       7.019s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmfeature/scope 5.964s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmfeature/status        5.301s
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/permissiontemplate/tests  [no test files]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/clustergroup      6.438s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackagerepository    6.484s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackagerepository/spec       5.869s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackagerepository/scope      6.490s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzupackagerepository/status     5.917s
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/backupschedule/tests      [no test files]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/backupschedule/scope      5.265s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmrepository    5.693s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmrepository/scope      6.238s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmrepository/status     5.637s
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/tanzukubernetescluster/tests      [no test files]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/workspace 6.563s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/namespace 6.354s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/ekscluster        6.712s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/provisioner       5.791s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmcharts        6.422s [no tests to run]
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/targetlocation/tests      [no test files]
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/inspections/tests [no test files]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmrelease       5.385s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmrelease/scope 5.940s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/helmrelease/status        6.310s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/common    6.636s
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/dataprotection/tests      [no test files]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kubernetessecret  6.247s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kubernetessecret/spec     5.606s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kubernetessecret/scope    6.632s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kubernetessecret/status   6.027s
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/custompolicytemplate/tests        [no test files]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kustomization     6.148s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kustomization/spec        5.532s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kustomization/scope       6.523s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/kustomization/status      5.923s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/akscluster        12.502s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/gitrepository     6.448s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/gitrepository/spec        5.842s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/gitrepository/scope       6.607s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/gitrepository/status      6.008s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/packages/packageslist     6.856s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/packages  5.930s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/sourcesecret      6.488s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/sourcesecret/spec 5.844s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/sourcesecret/scope        6.182s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/iampolicy 6.316s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/managementcluster 6.420s
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/customiamrole/tests       [no test files]
?       github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/clusterclass/tests        [no test files]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/package   5.857s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/package/spec      5.275s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/package/scope     6.629s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/scope      5.988s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/security      6.471s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/security/recipe       5.828s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/security/resource     6.369s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/mutation/recipe       5.761s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/mutation/resource     5.981s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/network       6.290s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/network/recipe        5.711s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/network/resource      6.006s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/image 6.176s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/image/recipe  5.661s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/image/resource        5.919s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/common        5.410s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/quota 6.398s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/quota/recipe  5.888s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/quota/resource        5.868s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/custom        6.041s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/custom/recipe 5.534s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy/kind/custom/resource       5.704s [no tests to run]
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/policy    5.694s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/provider    5.686s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/helper      7.164s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/client/transport    11.902s
ok      github.com/vmware/terraform-provider-tanzu-mission-control/internal/client/proxy        6.307s

Issue References

Additional Information

@tenthirtyam tenthirtyam added chore Chore technical-debt Technical Debt labels Apr 24, 2025
@tenthirtyam tenthirtyam added this to the .next milestone Apr 24, 2025
@github-actions github-actions bot added dependencies Dependencies provider Provider needs-review Needs Review labels Apr 24, 2025
@tenthirtyam tenthirtyam force-pushed the chore/migrate-to-terraform-plugin-testing branch from d766f40 to c6b8c4d Compare April 24, 2025 14:58
gurav-samir
gurav-samir previously approved these changes Apr 24, 2025
Migrate a provider's acceptance tests from the legacy SDKv2 to the testing module, `github.com/hashicorp/terraform-plugin-testing`:

- `github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest` >>> `github.com/hashicorp/terraform-plugin-testing/helper/acctest`
- `github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource` >>> `github.com/hashicorp/terraform-plugin-testing/helper/resource`
- `github.com/hashicorp/terraform-plugin-sdk/v2/terraform` >>> `github.com/hashicorp/terraform-plugin-testing/terraform`

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@tenthirtyam tenthirtyam force-pushed the chore/migrate-to-terraform-plugin-testing branch from c6b8c4d to 034514c Compare April 24, 2025 17:01
@tenthirtyam tenthirtyam merged commit 97bcc4b into main Apr 24, 2025
8 checks passed
@tenthirtyam tenthirtyam deleted the chore/migrate-to-terraform-plugin-testing branch April 24, 2025 17:23
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2025
@tenthirtyam tenthirtyam removed the needs-review Needs Review label Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

chore Chore dependencies Dependencies provider Provider technical-debt Technical Debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants