Refactor testCRUDAcl to Separated Case to Improve the Test Experience - #7705
Conversation
- Extracted shared ACL setup logic into a private helper method, setupAcl(). - Split original testCRUDAcl into two separate tests: testCRUDAclReadAll and testCRUDAclReadOne. - Each test case now represents a unique scenario for better readability and maintainability. - Replaced assertTrue(false) with fail() in catch blocks for better test failure indication. These changes aim to enhance the clarity and maintainability of the test suite, and ensure each test case checks only one scenario.
|
@blueorangutan package |
|
@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6392 |
Codecov Report
@@ Coverage Diff @@
## main #7705 +/- ##
=============================================
+ Coverage 13.37% 28.28% +14.90%
- Complexity 9320 29706 +20386
=============================================
Files 2740 5100 +2360
Lines 258249 385702 +127453
Branches 40235 63778 +23543
=============================================
+ Hits 34537 109086 +74549
- Misses 219354 261739 +42385
- Partials 4358 14877 +10519
Flags with carried forward coverage won't be shown. Click here to find out more. see 3667 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
DaanHoogland
left a comment
There was a problem hiding this comment.
looks good, but I just noticed this code is testing a no longer valid plugin. We can merge for my part however, for future development.
|
@Pearl1594 @nvazquez , Can you assess if still is usefull in further development? |
- Extracted shared ACL setup logic into a private helper method, setupAcl(). - Split original testCRUDAcl into two separate tests: testCRUDAclReadAll and testCRUDAclReadOne. - Each test case now represents a unique scenario for better readability and maintainability. - Replaced assertTrue(false) with fail() in catch blocks for better test failure indication. These changes aim to enhance the clarity and maintainability of the test suite, and ensure each test case checks only one scenario.
This reverts commit 3d352a4.
Description
This PR refactors the case testCRUDAcl.
Fix #6665
These changes aim to enhance the clarity and maintainability of the test suite, and ensure each test case checks only one scenario.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
The local cluster environment (KVM, UBUNTU 18.04) runs the test suite.