docs: proposal for unit tests that check state #5071
 Quality Gate passed
Issues
 0 New issues
 0 Accepted issues
Measures
 0 Security Hotspots
 0.0% Coverage on New Code
 0.0% Duplication on New Code
<!-- sqra-placement-anchor -->
See analysis details on SonarQube Cloud
I think the problem with migrating existing test is that "how" we get to the final state will not be tested anymore. While it is important to have a test to validate the final result, we have to test the "unit". In this context, a "unit" is an individual reconciliation, or parts of that individual reconciliation. The current tests validate multiple things. It is a code-smell, but we cannot simply remove the action-list machinery, we have to replace it with individual unit test, so we keep validating each transition individually.
Yes agreed. This will not happen for all tests. Only for those where we actually care about end state. For some tests we do indeed care about the how. It is the first bullet point under Risks
agaudreault
kostis-codefresh
This is a proposal for the third bullet point mentioned here https://github.com/argoproj/argo-rollouts/issues/107
Checklist:
[ ] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
[x] The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g.
"fix(controller): Updates such and such. Fixes #1234".[x] I've signed my commits with DCO
[ ] My builds are green. Try syncing with master if they are not.
[ ] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
[ ] I have run all tests locally (including the flaky ones) and they pass on my workstation
[ ] I have used LLM/AI/Agent tools for this PR but I am responsible for all code of this PR
[ ] I understand what the code does and WHY/HOW it works in several scenarios
[ ] I know if my code is just adding new functionality or changing old functionality for existing users
[x] My organization is added to USERS.md.