test: use google/go-cmp consistently when comparing APMEvent slices
Open
8.9-candidate
enhancement
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 543
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 109
Description
Whenever we are comparing batches or event slices we should use go-cmp for nicer and more readable output.
See an example in https://github.com/elastic/apm-server/pull/10592
`assert.ElementsMatch` will print the whole slice, often complainig about extra elements without performing a diff of the two slices.
Use `cmp.Diff` so that we can see what is wrong and why the tests are failing
Contributor guide
Assessment
This issue has not been assessed yet.