Review usage of cmp.Diff
to follow the (want, got)
pattern
#7027
Labels
area/testing
Issues or PRs related to testing
good first issue
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Hacktoberfest
Categorizes issue as one for Hacktoberfest 2021
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
We heavily use
cmp.Diff
in our tests. Those should follow the(want, got)
pattern (or(expected, actual)
) when used.However, if we go through the tests, sometimes it is used in the opposite way (aka
(got, want)
).This can become a problem when reviewing the failures of tests as, we are assuming the correct usage when printing out the error (
diff.PrintWantGot(d)
). This means, in some tests, the error is inverted, it displays "got" as wanted, and "wanted" as got… Which tends to be relatively painful when figuring things out.We would need to go from the former to the latter.
/cc @tektoncd/core-collaborators @tektoncd/core-maintainers
The text was updated successfully, but these errors were encountered: