Repository navigation
BAH- 5152/5324 | Fix. Sonar quality gate: remove duplicate Odoo DTOs, add handler tests - #365
Open
devsingh05298 wants to merge 3 commits into
Open
devsingh05298 wants to merge 3 commits into
devsingh05298 wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
devsingh05298
force-pushed
the
BAH-5152/5324-fix
branch
from
November 19, 2026 05:36
7f81038 to
4d465c7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes the SonarCloud quality gate that is failing on #361 (new code coverage 75% vs 80%, duplication 3.8% vs 3%).
Commit 1: BAH-5152 | Add. Unit tests for ImageUrlHandler and VideoUrlHandler
ImageUrlHandlerTestandVideoUrlHandlerTest(3 tests each): sets complex data from storage metadata, wrapsIOExceptioninUncheckedIOException,saveObsreturns the obs unchanged.Commit 2: BAH-5324 | Refactor. Read Odoo snake_case with a naming strategy, removing duplicate Odoo DTO classes
OdooStockDataandOdooAvailableStockResponse; they duplicatedStockData/AvailableStockResponse(48 duplicated lines) and left one uncovered mapping line.InventoryStockServiceImplnow reads Odoo's snake_case JSON with aSNAKE_CASEnaming strategy and ignores unknown keys (e.g.manufacturer).StockData/AvailableStockResponsestay annotation-free, so/availableStocksstill returns camelCase (batchNumber,expiryDate,stockLocationName, ...) regardless of the Jackson version.Why
Sonar's file-level report for #361: duplication came from
OdooStockData; uncovered lines came from the two handlers and one mapping line.Testing
bahmnicore-api: 366 tests, 0 failures.InventoryStockControllerTest(omod): 11 pass.Notes
omrs-2.8-local. Bindu | BAH-5152 | Upgrade bahmni core module for OMRS 2.8.x #361 re-runs Sonar once this is merged.null(covered by the service tests).