Skip to content

MOSIP-44918 - Fixed GetMachineHistory failure due to machine history not found.#1382

Merged
dhanendra06 merged 1 commit into
mosip:developfrom
mohanachandran-s:develop
Jun 1, 2026
Merged

MOSIP-44918 - Fixed GetMachineHistory failure due to machine history not found.#1382
dhanendra06 merged 1 commit into
mosip:developfrom
mohanachandran-s:develop

Conversation

@mohanachandran-s
Copy link
Copy Markdown
Contributor

@mohanachandran-s mohanachandran-s commented Jun 1, 2026

MOSIP-44918 - Fixed GetMachineHistory failure due to machine history not found.

Summary by CodeRabbit

Release Notes

  • Tests
    • Updated test validations for applicant type classification with revised response mappings
    • Enhanced error handling test scenarios to validate improved error responses for invalid input conditions
    • Improved test infrastructure with dynamic reference handling across API test suites for better maintainability

…not found.

Signed-off-by: Mohanachandran S <mohanachandran.s@technoforte.co.in>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4978676c-77b2-4e37-a5a0-fc874a9d7585

📥 Commits

Reviewing files that changed from the base of the PR and between cf58984 and 17275be.

📒 Files selected for processing (3)
  • api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml
  • api-test/src/main/resources/masterdata/GetMachineHistory/GetMachineHistory.yml
  • api-test/src/main/resources/masterdata/UserCenterMapping/UpdateUserCenterMapping.yml

Walkthrough

This PR updates expected test responses across three masterdata API test suites. GetApplicantType remaps applicantTypeCode values (010–016 → 002–008) for valid cases and converts invalid-input tests from error responses to result responses with error codes. GetMachineHistory uses a dynamic template ID in tests. UpdateUserCenterMapping replaces a placeholder reference with an explicit literal value.

Changes

Masterdata API Test Expectations

Layer / File(s) Summary
GetApplicantType valid applicant type code mappings
api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml
Nine valid test cases now expect remapped applicantTypeCode values: smoke and FR tests return 002, MLE NFR CHL returns 003, MLE NFR ADL returns 004, FLE FR CHL returns 005, FLE FR ADL returns 006, FLE NFR CHL returns 007, FLE NFR ADL returns 008.
GetApplicantType invalid input error handling
api-test/src/main/resources/masterdata/GetApplicantType/GetApplicantType.yml
Three invalid-input test cases (invalid residenceStatus, invalid gender, invalid biometricAvailable) switch from error template responses with error arrays to applicantTypeResult responses with error codes: "000" for residenceStatus and gender validation failures, "002" for biometricAvailable failures.
GetMachineHistory dynamic ID substitution
api-test/src/main/resources/masterdata/GetMachineHistory/GetMachineHistory.yml
Smoke test input and expected machineHistoryDetails now use dynamic template ID $ID:CreateMachine_All_Valid_Smoke_sid_id$ instead of static ID values.
UpdateUserCenterMapping explicit center name
api-test/src/main/resources/masterdata/UserCenterMapping/UpdateUserCenterMapping.yml
Smoke test response expected regCenterName value changes from placeholder reference to literal string "HSR Center updated".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Test data hops in with codes anew,
Old paths become zero-zero-two,
Invalid inputs dance with grace,
Dynamic templates find their place,
Center names are written plain—
Masterdata mappings all explained!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title focuses on GetMachineHistory, but the changeset includes significant updates to GetApplicantType and UpdateUserCenterMapping test cases, making the title incomplete and misleading about the scope. Revise the title to reflect all main changes (e.g., 'Update test data for GetApplicantType, GetMachineHistory, and UpdateUserCenterMapping') or clarify why only GetMachineHistory is mentioned.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dhanendra06 dhanendra06 merged commit 70afd1e into mosip:develop Jun 1, 2026
20 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.

4 participants