Skip to content

Fix truncated diagnostics in go-cmp diffs in tests #217

@paddycarver

Description

@paddycarver

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtIssues tracking technical debt that we're carrying.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions