You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Dpk376 (via GitHub)" <gi...@apache.org> on 2026/03/22 17:55:01 UTC

[PR] FINERACT-2549: Migrate LoanProductShortNameValidationTest from RestAssured to feign client [fineract]

Dpk376 opened a new pull request, #5675:
URL: https://github.com/apache/fineract/pull/5675

   ## What this PR does
   
   Migrates `LoanProductShortNameValidationTest` from the deprecated RestAssured-based approach to the typed fineract-client-feign client, as part of [FINERACT-2549](https://issues.apache.org/jira/browse/FINERACT-2549).
   
   ## Changes
   
   - **LoanProductShortNameValidationTest**: Removed RestAssured `requestSpec`/`responseSpec` fields, `@BeforeEach` setup, and `LoanTransactionHelper` dependency. Replaced with direct feign client calls using `FineractClientHelper` and `Calls.ok()`. The expected 403 duplicate short name error is now asserted using `assertThrows(CallFailedRuntimeException.class, ...)`.
   
   ## Checklist
   
   - [x] No RestAssured imports remaining
   - [x] GPG signed commit
   - [x] `spotlessApply` run
   - [x] Compiles successfully
   - [x] Relates to FINERACT-2549 (does not close it)


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2549: Migrate LoanProductShortNameValidationTest from RestAssured to feign client [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #5675:
URL: https://github.com/apache/fineract/pull/5675


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2549: Migrate LoanProductShortNameValidationTest from RestAssured to feign client [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5675:
URL: https://github.com/apache/fineract/pull/5675#issuecomment-4135889861

   Please run:
   `./gradlew spotlessApply spotbugsMain spotbugsTest checkstyleMain checkstyleTest`
   `./gradlew --no-daemon build -x test -x cucumber -x doc`
   
   Before any PR or changes, please always run these two commands and make sure there is green build!


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2549: Migrate LoanProductShortNameValidationTest from RestAssured to feign client [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #5675:
URL: https://github.com/apache/fineract/pull/5675#issuecomment-4135898085

   ```
   org.apache.fineract.integrationtests.LoanProductShortNameValidationTest
     
       Test createLoanProductsWithSameShortName() FAILED
     
       org.apache.fineract.client.util.CallFailedRuntimeException: HTTP failed: Request{method=POST, url=https://localhost:8443/fineract-provider/api/v1/loanproducts, tags={class retrofit2.Invocation=org.apache.fineract.client.services.LoanProductsApi.createLoanProduct() [class PostLoanProductsRequest {
           accountMovesOutOfNPAOnlyOnArrearsCompletion: null
           accountingRule: null
           allowApprovedDisbursedAmountsOverApplied: null
           allowAttributeOverrides: null
           allowCompoundingOnEod: null
           allowFullTermForTranche: null
           allowPartialPeriodInterestCalculation: null
           allowVariableInstallments: null
           amortizationType: 1
           buyDownExpenseAccountId: null
           buyDownFeeCalculationType: null
           buyDownFeeIncomeType: null
           buyDownFeeStrategy: null
           buydownfeeClassificationToIncomeAccountMappings: null
           canDefineInstallmentAmount: null
           canUseForTopup: null
           capitalizedIncomeCalculationType: null
           capitalizedIncomeClassificationToIncomeAccountMappings: null
           capitalizedIncomeStrategy: null
           capitalizedIncomeType: null
           chargeOffBehaviour: null
           chargeOffExpenseAccountId: null
           chargeOffFraudExpenseAccountId: null
           receivablePenaltyAccountId: null
           repaymentEvery: 1
           repaymentFrequencyType: 2
           repaymentStartDateType: null
           rescheduleStrategyMethod: null
           shortName: 6IK4
           startDate: null
           supportedInterestRefundTypes: null
           transactionProcessingStrategyCode: mifos-standard-strategy
           transfersInSuspenseAccountId: null
           useBorrowerCycle: null
           writeOffAccountId: null
           writeOffReasonsToExpenseMappings: null
       }]}}; Response{protocol=http/1.1, code=400, message=, url=https://localhost:8443/fineract-provider/api/v1/loanproducts}; errorBody: {"developerMessage":"The request was invalid. This typically will happen due to validation errors which are provided.","httpStatusCode":"400","defaultUserMessage":"Validation errors exist.","userMessageGlobalisationCode":"validation.msg.validation.errors.exist","errors":[{"defaultUserMessage":"The parameter `interestCalculationPeriodType` is mandatory.","parameterName":"interestCalculationPeriodType","developerMessage":"The parameter `interestCalculationPeriodType` is mandatory.","userMessageGlobalisationCode":"validation.msg.loanproduct.interestCalculationPeriodType.cannot.be.blank","args":[{}]},{"defaultUserMessage":"The parameter `daysInYearType` is mandatory.","parameterName":"daysInYearType","developerMessage":"The parameter `daysInYearType` is mandatory.","userMessageGlobalisationCode":"validation.msg.loanproduct.daysInYearType.cannot.be.bla
 nk","args":[{}]},{"defaultUserMessage":"The parameter `daysInYearType` must be one of [ 1, 360, 364, 365 ] .","parameterName":"daysInYearType","developerMessage":"The parameter `daysInYearType` must be one of [ 1, 360, 364, 365 ] .","userMessageGlobalisationCode":"validation.msg.loanproduct.daysInYearType.is.not.one.of.expected.enumerations","args":[{},{"value":[1,360,364,365]}]},{"defaultUserMessage":"The parameter `daysInMonthType` is mandatory.","parameterName":"daysInMonthType","developerMessage":"The parameter `daysInMonthType` is mandatory.","userMessageGlobalisationCode":"validation.msg.loanproduct.daysInMonthType.cannot.be.blank","args":[{}]},{"defaultUserMessage":"The parameter `daysInMonthType` must be one of [ 1, 30 ] .","parameterName":"daysInMonthType","developerMessage":"The parameter `daysInMonthType` must be one of [ 1, 30 ] .","userMessageGlobalisationCode":"validation.msg.loanproduct.daysInMonthType.is.not.one.of.expected.enumerations","args":[{},{"value":[1,30]}]}
 ,{"defaultUserMessage":"The parameter `isInterestRecalculationEnabled` is mandatory.","parameterName":"isInterestRecalculationEnabled","developerMessage":"The parameter `isInterestRecalculationEnabled` is mandatory.","userMessageGlobalisationCode":"validation.msg.loanproduct.isInterestRecalculationEnabled.cannot.be.blank","args":[{}]},{"defaultUserMessage":"The parameter `isInterestRecalculationEnabled` must be one of [ true, false ] .","parameterName":"isInterestRecalculationEnabled","developerMessage":"The parameter `isInterestRecalculationEnabled` must be one of [ true, false ] .","userMessageGlobalisationCode":"validation.msg.loanproduct.isInterestRecalculationEnabled.is.not.one.of.expected.enumerations","args":[{},{"value":[true,false]}]},{"defaultUserMessage":"The parameter `accountingRule` is mandatory.","parameterName":"accountingRule","developerMessage":"The parameter `accountingRule` is mandatory.","userMessageGlobalisationCode":"validation.msg.loanproduct.accountingRule.c
 annot.be.blank","args":[{}]}]}
           at app//org.apache.fineract.integrationtests.LoanProductShortNameValidationTest.createLoanProductsWithSameShortName(LoanProductShortNameValidationTest.java:40)
     
     


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org