We use go-cmp pretty extensively in our tests to compare values. This works great, except when comparing diagnostics. As documented in google/go-cmp#279, our diagnostic detail output usually gets truncated, mostly right after telling us that an error occurred and it's always a problem with the provider. This leads to us littering logging statements around logging error output in our tests, which feels suboptimal.
I think we can write a customer Reporter but that seems like a large-ish undertaking, requires us to pass an option to all our calls to cmp.Diff, and I'm confused about whether we can use that for Diff or if it's just for Equal.
Seeing how google/go-cmp#279 resolves may help guide what we want to do here.
We use go-cmp pretty extensively in our tests to compare values. This works great, except when comparing diagnostics. As documented in google/go-cmp#279, our diagnostic detail output usually gets truncated, mostly right after telling us that an error occurred and it's always a problem with the provider. This leads to us littering logging statements around logging error output in our tests, which feels suboptimal.
I think we can write a customer Reporter but that seems like a large-ish undertaking, requires us to pass an option to all our calls to
cmp.Diff, and I'm confused about whether we can use that forDiffor if it's just forEqual.Seeing how google/go-cmp#279 resolves may help guide what we want to do here.