helper/resource: Checking Collection Attribute Length Ignores Missing/Null Attributes #1085
Labels
bug
Something isn't working
subsystem/tests
Issues and feature requests related to the testing framework.
SDK version
Relevant provider source code
Terraform Configuration Files
Expected Behavior
Test checks fail that the attribute doesn't exist with the framework code.
Actual Behavior
Test checks pass with the framework code. It specifically ignores returning an error in this situation:
terraform-plugin-sdk/helper/resource/testing.go
Lines 997 to 1005 in b5b7dd0
This rule was intentionally added because provider developers were already depending on this type of testing logic years ago:
57c8f96
Steps to Reproduce
TF_ACC=1 go test -count=1 -v ./...
References
null
vs. empty map terraform-provider-aws#27377The text was updated successfully, but these errors were encountered: