test: use custom filter to make tests less brittle#2544
Conversation
Codecov ReportBase: 53.62% // Head: 53.51% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2544 +/- ##
==========================================
- Coverage 53.62% 53.51% -0.12%
==========================================
Files 120 120
Lines 10634 10634
==========================================
- Hits 5703 5691 -12
- Misses 4500 4509 +9
- Partials 431 434 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
edb9fc3 to
084571c
Compare
|
@acpana can you explain why this was brittle? What was causing it to break? Just curious |
the tl;dr issue imo is that we are comparing structs absolutely (i.e. all the fields). you'll see that we have a few When working on the structs themselves, like does this help offer more context? |
Thanks for clearing it up |
084571c to
d285243
Compare
| } | ||
| } | ||
|
|
||
| func ignoreGatorResultFields() cmp.Option { |
There was a problem hiding this comment.
the main difference here between our custom option and the IgnoreFields option is that the latter relies the existence of a field; ref: https://github.com/google/go-cmp/blob/a97318bf6562f2ed2632c5f985db51b1bc5bdcd0/cmp/cmpopts/struct_filter.go#L177-L179
|
@maxsmythe @sozercan @ritazh PTAL 🙏🏼 |
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
Signed-off-by: Alex Pana <8968914+acpana@users.noreply.github.com>
9ddb3a6 to
f086ea6
Compare
…#2544) Signed-off-by: Xander Grzywinski <xandergr@microsoft.com>
Re working some of these to be less brittle. It's going to help any time we make changes to the
Resulttype in CF.Signed-off-by: Alex Pana 8968914+acpana@users.noreply.github.com