KRYSTALM7 opened a new issue, #155:
URL: https://github.com/apache/fineract-loan-origination/issues/155

   ## Problem
   
   The mock Fineract adapter is currently enabled by default.
   
   A deployment that does not explicitly disable the mock can mark applications 
as successfully disbursed without creating a corresponding loan in Fineract.
   
   ## Runtime Evidence
   
   A mock disbursement produced:
   
   - LOS status: `DISBURSED`
   - Fineract loan ID: `100001`
   - Integration status: `LOAN_DISBURSED`
   
   However:
   
   `GET /fineract-provider/api/v1/loans/100001`
   
   returned `404`.
   
   ## Root Cause
   
   `application.yml` currently defaults:
   
   `FINERACT_MOCK_ENABLED:true`
   
   and `MockFineractLoanApiClient` uses:
   
   `matchIfMissing = true`.
   
   ## Proposed Fix
   
   - Change the default to `false`.
   - Set the mock explicitly in dev/test profiles.
   - Change `matchIfMissing` to `false`.
   - Fail startup outside dev/test if the mock is enabled.
   - Log a warning when the mock is active.
   
   ## Acceptance Criteria
   
   - [ ] Real Fineract is used by default.
   - [ ] Mock must be explicitly enabled.
   - [ ] Production startup fails when the mock is enabled.
   - [ ] Dev/test can use the mock.
   - [ ] Existing mock tests continue to pass.
   
   ## Regression Tests
   
   - [ ] Default configuration uses REST adapter.
   - [ ] Production profile rejects mock.
   - [ ] Dev profile allows mock.
   
   ## Dependencies 
   
   None.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to