Skip to content

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

Merged
adamsaghy merged 1 commit intoapache:developfrom
DeathGun44:FINERACT-2116/credit-bureau-config-validation
Feb 18, 2026
Merged

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

Conversation

@DeathGun44
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@DeathGun44
Copy link
Copy Markdown
Contributor Author

@adamsaghy I believe these failures are just flaky tests could you please rerun them?

@adamsaghy
Copy link
Copy Markdown
Contributor

adamsaghy commented Feb 18, 2026

No, neither of them are related to tests.

Signed commit check fails because you dont have set up GPG signature (which we will enforce soon), for now it would not block the merge.

I have restarted the checks.

@DeathGun44
Copy link
Copy Markdown
Contributor Author

@adamsaghy Regarding the 2 failing checks after re-run:

  1. Signed Commits Check — My commit is GPG-signed and my key is on GitHub. The check is failing because it validates GitHub's auto-generated merge ref (b35e92e), which is an unsigned merge commit created by GitHub to test mergeability — not my actual commit. I'll open a fix for the verify script to skip these merge commits.

  2. Liquibase Backward Compatibility (ExternalEventConfigurationNotFoundException) — This is unrelated to my changes. My PR is purely additive (3 Java files, 247 insertions, 0 deletions) with no changes to Liquibase changelogs, SQL, or config files. This appears to be a base branch / CI environment issue.

@adamsaghy adamsaghy merged commit 2a2ce6e into apache:develop Feb 18, 2026
36 of 39 checks passed
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