Skip to content

FINERACT-2116: Add validation integration tests for Credit Bureau Configuration APIs#5460

Open
DeathGun44 wants to merge 1 commit intoapache:developfrom
DeathGun44:FINERACT-2116/credit-bureau-config-validation
Open

FINERACT-2116: Add validation integration tests for Credit Bureau Configuration APIs#5460
DeathGun44 wants to merge 1 commit intoapache:developfrom
DeathGun44:FINERACT-2116/credit-bureau-config-validation

Conversation

@DeathGun44
Copy link
Contributor

@DeathGun44 DeathGun44 commented Feb 6, 2026

Description

This PR adds validation integration tests for Credit Bureau Configuration APIs (FINERACT-2116).

Tests cover:

  • Credit Bureau Configuration: missing/blank/exceeding length for configkey, value, description
  • Organisation Credit Bureau: missing/blank/exceeding length for alias
  • Loan Product Mapping: missing loanProductId, isCreditcheckMandatory, skipCreditcheckInFailure, stalePeriod

Implementation notes:

  • Wired CreditBureauConfigurationApi into FineractClient
  • New helper methods use fineract-client (Calls.ok()) instead of deprecated REST Assured utils
  • Validation errors asserted via CallFailedRuntimeException

Checklist

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green")
  • Create/update unit or integration tests for verifying the changes made
  • Follow our coding conventions
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump"

@adamsaghy
Copy link
Contributor

@DeathGun44 Please rebase this PR with latest develop branch to fix:

   Test testCreateMapping_MissingLoanProductId_ShouldFail400() FAILED
  
    java.lang.AssertionError: 1 expectation failed.
    Expected status code <400> but was <500>.
        at org.apache.fineract.integrationtests.CreditBureauConfigurationValidationTest.testCreateMapping_MissingLoanProductId_ShouldFail400(CreditBureauConfigurationValidationTest.java:176)
  

@DeathGun44 DeathGun44 force-pushed the FINERACT-2116/credit-bureau-config-validation branch from abfde50 to e7d8544 Compare February 11, 2026 11:52
@DeathGun44
Copy link
Contributor Author

@adamsaghy please re-run the tests ,they should all be green now

Copy link
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return new Gson().toJson(map);
}

// TODO: Rewrite to use fineract-client instead!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not introduce new functionalities which are not using the fineract-client framework!

Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly see my concerns!

@DeathGun44 DeathGun44 force-pushed the FINERACT-2116/credit-bureau-config-validation branch from e7d8544 to 8ee10c4 Compare February 17, 2026 13:44
…figuration APIs

Signed-off-by: DeathGun44 <krishnamewara841@gmail.com>
@DeathGun44 DeathGun44 force-pushed the FINERACT-2116/credit-bureau-config-validation branch from 8ee10c4 to 3f89d1a Compare February 17, 2026 13:45
@DeathGun44
Copy link
Contributor Author

@adamsaghy Addressed — to keep scope aligned, I've migrated only the newly added helper methods to use fineract-client. I'll open a separate issue to migrate the remaining deprecated methods in the helper file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants