Log warning for assets that did not return a value for ID field#218
Conversation
|
Looks like there's a panic caused by GoogleCloudPlatform/terraform-google-conversion#709 |
melinath
left a comment
There was a problem hiding this comment.
LGTM as an implementation; would it be possible to add an integration test? I assume we would need to avoid using a module, but perhaps we could explicitly set up the underlying relationship that caused the crash?
Adding tests for resources is documented a bit here: https://github.com/GoogleCloudPlatform/terraform-validator/blob/master/docs/add_new_resource.md#2-terraform-validator
I imagine it would be similar to the example_storage_bucket_iam_member tests.
|
The tests are passing for both me & @c2thorn locally. This is because the results of We use In test runs, we then "normalize" assets for comparison, which replaces |
|
It's odd that it seems to pass consistently for me locally though... :-/ |
|
Okay, so if I am just running the one test, it always gets the same values for the random placeholder strings. This is almost certainly because we use So, the full test suite is probably failing because it's preceded by a bunch of On the plus side, this means that if we can find a thread-safe way to reset the seed before each test, we could make all tests deterministic with regard to their generated strings. If that doesn't work we'll have to find some other solution. |
|
@melinath Moved the test failure to its own issue, skipped the test and rebased. |
Closes #216
Tested with a tfjson plan identical to the one in the issue.