New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit testing framework discussion: standard Go style unit testing via testing
and go-checker
framework
#16860
Comments
(Feel free to edit to update) Std Go style:Pros:
Cons:
|
testing
and go-checker
framework currently usedtesting
and go-checker
framework
To expand on that, this is due to most code of this package originally being developed out of tree. We noticed the discrepancy at the time, but decided it was much work and not much benefit in moving all code to We did run into issues with |
@christarazi I believe we came to an agreement on this ticket. We came to the decision that new code will use the std-library testing package with go-cmp in addition when comparison is necessary. We won't be "re-writing" any tests which exist today to conform to this, and this decision is for subsequent new code. Should this ticket remain open? |
I think it makes sense to keep open for visibility. |
This issue has been automatically marked as stale because it has not |
From @lmb in slack The PR is here, and contains some context why this change is necessary / useful. this is a tree-wide change and so has the possibility to impact a bunch of people, so i want to raise awareness here. i'm planning to get this merged next wednesday-ish, 2023-05-24. the following things will change: |
(Copied from https://cilium.slack.com/archives/C2B917YHE/p1626113446459700)
In terms of adoption, one approach would be to add new tests using the std Go style and over time we gradually move away from gocheck. Not advocating for a rewrite immediately.
Used for tracking pros and cons, and capturing other discussions because Slack will lose history
The text was updated successfully, but these errors were encountered: