Corrected decommissionRegCenterFail_WithMappedRegCenter testcase [MOSIP-44916]#1354
Corrected decommissionRegCenterFail_WithMappedRegCenter testcase [MOSIP-44916]#1354dhanendra06 merged 3 commits intomosip:developfrom
Conversation
…IP-44916] Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUn-ignores a previously skipped test for decommissioning a registration center and adds a SQL setup step that deletes Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@admin/kernel-masterdata-service/src/test/java/io/mosip/kernel/masterdata/test/controller/RegistrationCenterControllerTest.java`:
- Around line 516-528: The test decommissionRegCenterFail_WithMappedRegCenter is
too permissive: the service method decommissionRegCenter
(RegistrationCenterServiceImpl) deterministically checks users first and for
regcenterID=10003 will always return KER-MSD-352 (MAPPED_TO_USER), so replace
the OR substring assertion with a strict check for KER-MSD-352 using the project
helper and an explicit HTTP status assertion; specifically update
decommissionRegCenterFail_WithMappedRegCenter to use
MasterDataTest.checkResponse(result, "KER-MSD-352") (or equivalent helper) and
assert the HTTP response status is the expected error status (e.g., 400) instead
of using body.contains("KER-MSD-351") || body.contains("KER-MSD-352").
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4ca013e3-b5d9-4a75-a313-a6b2c28cb0b4
📒 Files selected for processing (1)
admin/kernel-masterdata-service/src/test/java/io/mosip/kernel/masterdata/test/controller/RegistrationCenterControllerTest.java
Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
Summary by CodeRabbit