-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
internal/lang: ephemeralasnull
: Add test for unknown values
#35673
Conversation
6b8535a
to
79af3d0
Compare
This seems to be gradually growing to replicate several cases already covered in this function's main tests: terraform/internal/lang/funcs/conversion_test.go Lines 210 to 349 in a203951
Typically these function-table-level tests have been used only to test whether a function is correctly registered in the function table so it can be used at all, rather than getting into all the weeds of how the function behaves. No significant harm in adding these additional tests of course, but I point it out in case you've been doing this just because you didn't know the other test cases were there. (This mostly-redundant set of tests in the |
@apparentlymart Good catch! I didn't notice these tests earlier. I should've checked the test cover more thoroughly.. |
This is a small PR following up on #35652 which I wanted to split from #35653 as that PR may require some further discussions.
It covers the extra logic present in the function implementation concerning unknown values:
terraform/internal/lang/funcs/conversion.go
Lines 132 to 144 in e312ffc
In other words, the test (and underlying logic under test) ensures that other marks (other than ephemerality) are retained while passing through that function.