Skip to content

MOSIP-41353: Remove unused config files and properties in MASTERDATA module.#1348

Open
SradhaMohanty5899 wants to merge 2 commits intomosip:developfrom
SradhaMohanty5899:MOSIP-41353
Open

MOSIP-41353: Remove unused config files and properties in MASTERDATA module.#1348
SradhaMohanty5899 wants to merge 2 commits intomosip:developfrom
SradhaMohanty5899:MOSIP-41353

Conversation

@SradhaMohanty5899
Copy link
Contributor

@SradhaMohanty5899 SradhaMohanty5899 commented Mar 11, 2026

Performed cleanup of unused configuration files and properties in the MASTERDATA API Test Rig module.

  • Verified all files under src/main/resources/config.
  • Removed unused configuration files where they were not referenced in the module.
  • Verified property usage in application.properties and removed unused entries.

Summary by CodeRabbit

  • Chores
    • Removed unused imports across multiple test classes to clean up code.
    • Deleted outdated test configuration files, endpoint mappings, and static test data templates.
    • Streamlined test infrastructure by removing legacy test-data setup and bulk-upload configurations.

Signed-off-by: Sradha Mohanty <mohantysradha10@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Walkthrough

Removed unused imports from multiple masterdata test classes and a utility; deleted or stripped several resource/config files (properties and JSON) under api-test/resources, including a large adminQueries.properties file.

Changes

Cohort / File(s) Summary
Testscripts Import Cleanup
api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/DeleteWithParam.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithParam.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithQueryParam.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithPathParam.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithQueryParam.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithFormDataAndFile.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithPathParamsAndBody.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParam.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParamsAndBody.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimpleDelete.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePost.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePostForAutoGenId.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePut.java, api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePutForAutoGenId.java
Removed unused imports (java.lang.reflect.Field, org.testng.internal.BaseTestMethod, org.testng.internal.TestResult) across 14 test classes. No logic or signature changes.
Utility Class Cleanup
api-test/src/main/java/io/mosip/testrig/apirig/masterdata/utils/MasterDataUtil.java
Removed unused import (BaseTestCase). No functional or API changes.
Config: Umc validation mappings
api-test/src/main/resources/config/UmcValidationApis.properties
Removed six API endpoint key-value mappings; file narrowed.
Config: adminQueries removed
api-test/src/main/resources/config/adminQueries.properties
Deleted entire file (large collection of SQL setup/teardown statements and test data inserts).
Config: application properties trimmed
api-test/src/main/resources/config/application.properties
Removed numerous endpoint and config entries; kept/reordered minimal properties (e.g., zone mapping entry).
Resource JSON templates removed
api-test/src/main/resources/config/bioValueEncryptionTemplate.json, api-test/src/main/resources/config/bulkUpload.json, api-test/src/main/resources/config/mispPolicy.json
Deleted JSON template files and policy config; files removed or emptied. No code changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I nibbled the unused, pulled out the frill,
Trims here and there, now the trunk sits still.
Queries and templates hopped out of sight,
A lighter repo for day and night. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: removing unused config files and properties in the MASTERDATA module, matching the changeset content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
api-test/src/main/resources/config/application.properties (1)

1-21: ⚠️ Potential issue | 🟠 Major

Remove unused endpoint properties and correct AI summary discrepancy.

The endpoint path properties defined in lines 2-21 (encryptionPath, internalEncryptionPath, encodePath, decodePath, decryptPath, encodeFilePath, decodeFilePath, validateSignaturePath, splitEncryptedData, masterSchemaURL, fetchLocationData, fetchTitle, fetchZoneCode, fetchZone, fetchLocationHierarchyLevels, fetchLocationHierarchy, leafZoneUrl, and zoneCode_to_beMapped) are not referenced anywhere in the codebase and should be removed as part of this cleanup. Additionally, the AI summary stating the file "now retains only demoAppVersion" is inaccurate—these properties remain in the file. Align the final state with the PR objective to remove unused MASTERDATA module properties.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-test/src/main/resources/config/application.properties` around lines 1 -
21, Delete the unused MASTERDATA-related properties listed (encryptionPath,
internalEncryptionPath, encodePath, decodePath, decryptPath, encodeFilePath,
decodeFilePath, validateSignaturePath, splitEncryptedData, masterSchemaURL,
fetchLocationData, fetchTitle, fetchZoneCode, fetchZone,
fetchLocationHierarchyLevels, fetchLocationHierarchy, leafZoneUrl, and
zoneCode_to_beMapped) from application.properties, and update the file
header/comment to accurately state that these MASTERDATA endpoint properties
have been removed (fixing the incorrect AI summary about retaining
demoAppVersion). Ensure no other config keys are unintentionally removed and
commit the cleaned file.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@api-test/src/main/resources/config/application.properties`:
- Line 22: Remove the unused property demoAppVersion from the
application.properties file: delete the line "demoAppVersion=1.2.1-SNAPSHOT" and
then verify there are no references to demoAppVersion anywhere in the codebase
(search for "demoAppVersion") before committing; if any code or build scripts
reference it, either remove those references or migrate them to an existing
version property.

---

Outside diff comments:
In `@api-test/src/main/resources/config/application.properties`:
- Around line 1-21: Delete the unused MASTERDATA-related properties listed
(encryptionPath, internalEncryptionPath, encodePath, decodePath, decryptPath,
encodeFilePath, decodeFilePath, validateSignaturePath, splitEncryptedData,
masterSchemaURL, fetchLocationData, fetchTitle, fetchZoneCode, fetchZone,
fetchLocationHierarchyLevels, fetchLocationHierarchy, leafZoneUrl, and
zoneCode_to_beMapped) from application.properties, and update the file
header/comment to accurately state that these MASTERDATA endpoint properties
have been removed (fixing the incorrect AI summary about retaining
demoAppVersion). Ensure no other config keys are unintentionally removed and
commit the cleaned file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 46873673-879c-4fe8-b1ea-631f23c4e6de

📥 Commits

Reviewing files that changed from the base of the PR and between 959c9be and a746798.

📒 Files selected for processing (21)
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/DeleteWithParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithQueryParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithPathParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithQueryParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithFormDataAndFile.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithPathParamsAndBody.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParamsAndBody.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimpleDelete.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePost.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePostForAutoGenId.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePut.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePutForAutoGenId.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/utils/MasterDataUtil.java
  • api-test/src/main/resources/config/UmcValidationApis.properties
  • api-test/src/main/resources/config/adminQueries.properties
  • api-test/src/main/resources/config/application.properties
  • api-test/src/main/resources/config/bioValueEncryptionTemplate.json
  • api-test/src/main/resources/config/bulkUpload.json
  • api-test/src/main/resources/config/mispPolicy.json
💤 Files with no reviewable changes (20)
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithPathParamsAndBody.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePut.java
  • api-test/src/main/resources/config/adminQueries.properties
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePostForAutoGenId.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PostWithFormDataAndFile.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePutForAutoGenId.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParamsAndBody.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/DeleteWithParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PutWithPathParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithQueryParam.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimpleDelete.java
  • api-test/src/main/resources/config/UmcValidationApis.properties
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/SimplePost.java
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/utils/MasterDataUtil.java
  • api-test/src/main/resources/config/bulkUpload.json
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/GetWithQueryParam.java
  • api-test/src/main/resources/config/bioValueEncryptionTemplate.json
  • api-test/src/main/java/io/mosip/testrig/apirig/masterdata/testscripts/PatchWithPathParam.java
  • api-test/src/main/resources/config/mispPolicy.json

Signed-off-by: Sradha Mohanty <mohantysradha10@gmail.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
api-test/src/main/resources/config/application.properties (1)

20-21: ⚠️ Potential issue | 🟠 Major

Restore the required demoAppVersion property.

This cleanup appears to have removed demoAppVersion from application.properties, but that property is required in this module and should not be deleted as part of unused-config cleanup. Please add it back before merging.

Based on learnings, demoAppVersion in api-test/src/main/resources/config/application.properties is required and intentionally kept.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-test/src/main/resources/config/application.properties` around lines 20 -
21, Restore the missing demoAppVersion property in application.properties by
re-adding the demoAppVersion key with its expected value (e.g., the module's
default like 1.0.0 or the value used elsewhere), ensuring the application reads
demoAppVersion again; update the file where the cleanup removed it and verify
any code referencing demoAppVersion (search for "demoAppVersion") still resolves
correctly so the property isn't removed by future cleanup.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@api-test/src/main/resources/config/application.properties`:
- Around line 20-21: Restore the missing demoAppVersion property in
application.properties by re-adding the demoAppVersion key with its expected
value (e.g., the module's default like 1.0.0 or the value used elsewhere),
ensuring the application reads demoAppVersion again; update the file where the
cleanup removed it and verify any code referencing demoAppVersion (search for
"demoAppVersion") still resolves correctly so the property isn't removed by
future cleanup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d201713e-79a1-4d60-bbea-c11e62823241

📥 Commits

Reviewing files that changed from the base of the PR and between a746798 and 41bd315.

📒 Files selected for processing (1)
  • api-test/src/main/resources/config/application.properties

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