Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RHOAIENG-17634: chore(odh-nbc/tests): implement diff minimization for…
… k8s objects diffs (#503) * RHOAIENG-17634: chore(odh-nbc/tests): implement diff minimization for k8s objects diffs This is a followup to the refactoring before. The minimal diffs are computed by taking the `actual` value, making a deep copy of it, applying the differences between `actual` and `expected` to the deep copy, and calling the comparison function repeatedly. * fixup a bug where I tried to set invalid values * fixup robustness by adding a fallback cmp.Diff * review suggestion, always print the full diff first, followed by minimized diff this way we always have all the info when test fails, but it's still not difficult to find the minimized diff for initial diagnostics, because it's the most obvious thing at the bottom * review suggestion, fix typo in components/odh-notebook-controller/controllers/matchers_test.go Co-authored-by: Andy Stoneberg <[email protected]> --------- Co-authored-by: Andy Stoneberg <[email protected]>
- Loading branch information