Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test): Add custom comparer to ignore timestamps in capture tests (#…
…1173) # Description Previously, in [PR 894](#894), timestamps were introduced to be able to print capture names as their jobs were beginning. This PR addresses an oversight in the testing which compared whether the timestamp of the test and the timestamp of the test capture were the same. This was not always the case - particularly if there was some delay between the beginning of the test and the beginning of the capture. The change in this PR adds a custom comparer to the `cmp.Diff` which ignores the timestamp environment variables. ## Related Issue [1045](#1045) ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [ ] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Testing Completed The tests now succeed regardless of whether a delay occurs or not - causing the timestamps to differ. This was simulated with an artificial delay with `time.Sleep`. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. --------- Signed-off-by: Kamil <[email protected]>
- Loading branch information