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

refactor: update tests to use new standalone terraform-plugin-testing module #526

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

ocobles
Copy link
Contributor

@ocobles ocobles commented Jan 18, 2024

a go module was released last year to keep testing functionality separated from schema logic https://github.com/hashicorp/terraform-plugin-testing We need this replacement to use some functionality required to test migration from sdkv2 to framework, like plancheck https://developer.hashicorp.com/terraform/plugin/framework/migrating/testing#example

Keeping both github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource and github.com/hashicorp/terraform-plugin-testing/helper/resource imports produces a panic error #406 (comment) so it is required to fully replace all

@ocobles ocobles requested a deployment to internal January 18, 2024 18:12 — with GitHub Actions Abandoned
@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2024

Codecov Report

Attention: 764 lines in your changes are missing coverage. Please review.

Comparison is base (26b2f3d) 60.11% compared to head (e73b796) 58.85%.
Report is 136 commits behind head on main.

Files Patch % Lines
internal/errors/errors.go 7.05% 145 Missing ⚠️
equinix/fabric_mapping_helper.go 0.00% 69 Missing ⚠️
equinix/resource_metal_device.go 75.43% 42 Missing and 15 partials ⚠️
equinix/resource_fabric_connection.go 0.00% 54 Missing ⚠️
equinix/resource_fabric_cloud_router.go 0.00% 46 Missing ⚠️
equinix/resource_network_device.go 2.50% 39 Missing ⚠️
equinix/resource_fabric_routing_protocol.go 0.00% 26 Missing ⚠️
equinix/resource_fabric_service_profile.go 0.00% 26 Missing ⚠️
internal/resources/metal/metal_ssh_key/resource.go 73.62% 19 Missing and 5 partials ⚠️
equinix/resource_ecx_l2_serviceprofile.go 41.66% 14 Missing ⚠️
... and 44 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
- Coverage   60.11%   58.85%   -1.27%     
==========================================
  Files          99       96       -3     
  Lines       20045    19857     -188     
==========================================
- Hits        12051    11686     -365     
- Misses       7691     7885     +194     
+ Partials      303      286      -17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ocobles ocobles requested a deployment to internal January 18, 2024 19:09 — with GitHub Actions Abandoned
Copy link
Contributor

@ctreatma ctreatma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a couple re-runs, the CI failures appear to be flakes and not related to these changes, so LGTM.

@ctreatma ctreatma merged commit 49deb07 into main Jan 18, 2024
4 of 5 checks passed
@ctreatma ctreatma deleted the replace-terraform-plugin-testing branch January 18, 2024 20:20
cprivitere added a commit that referenced this pull request Jan 18, 2024
#526 adopted the terraform-plugin-testing module, but #520 introduced a
new test that had a reference to the old terraform-plugin-sdk version of
that module. Since we don't have a requirement in place for PRs to be
up-to-date before merging, #526 got merged without being updated to also
fix the new test from #520, and as a result the `Go test` workflow
started failing. This updates the new test to match the others.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants