Skip to content

Commit

Permalink
MOSIP-36649 - fixed registration center and location not found issue (#…
Browse files Browse the repository at this point in the history
…1347)

Signed-off-by: Mohanachandran S <[email protected]>
  • Loading branch information
mohanachandran-s authored Nov 4, 2024
1 parent cd5e51e commit 50113e3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 254 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public static void main(String[] arg) {
KeycloakUserManager.createUsers();
KeycloakUserManager.closeKeycloakInstance();

List<String> localLanguageList = new ArrayList<>(BaseTestCase.getLanguageList());
AdminTestUtil.getLocationData();
AdminTestUtil.getRegistrationCenterData();
AdminTestUtil.getLocationDataWithLocationCode(BaseTestCase.locationCode);

// Generate device certificates to be consumed by Mock-MDS
PartnerRegistration.deleteCertificates();
Expand Down
2 changes: 2 additions & 0 deletions api-test/src/main/resources/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ decryptKycUrl=/v1/identity/decryptEkycData
retrieveIdByUin=/idrepository/v1/identity/idvid/
fetchLocationHierarchyLevels=/v1/masterdata/locationHierarchyLevels/
fetchLocationHierarchy=/v1/masterdata/locations/locationhierarchy/
fetchRegCent = /v1/masterdata/registrationcenters
fetchLocationDataWithCode = /v1/masterdata/locations/info/
generateArgon2HashURL=/v1/keymanager/generateArgon2Hash
appointmentavailabilityurl=/preregistration/v1/appointment/availability/
validateSignatureUrl=v1/identity/validateSign
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ GetRegCenterByLangCodeAndHierarchyLevel:
outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "5",
"name": "10112"
"hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$",
"name": "$LOCATIONNAME$"
}'
output: '{
}'
Expand All @@ -27,7 +27,7 @@ GetRegCenterByLangCodeAndHierarchyLevel:
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "tt",
"name": "10112"
"name": "$LOCATIONNAME$"
}'
output: '{
"errors": [
Expand All @@ -48,7 +48,7 @@ GetRegCenterByLangCodeAndHierarchyLevel:
outputTemplate: resident/error
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "5",
"hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$",
"name": "tt"
}'
output: '{
Expand All @@ -70,8 +70,8 @@ GetRegCenterByLangCodeAndHierarchyLevel:
outputTemplate: resident/error
input: '{
"langcode": "engg",
"hierarchylevel": "5",
"name": "10112"
"hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$",
"name": "$LOCATIONNAME$"
}'
output: '{
"errors": [
Expand All @@ -92,8 +92,8 @@ GetRegCenterByLangCodeAndHierarchyLevel:
outputTemplate: resident/error
input: '{
"langcode": "1234",
"hierarchylevel": "7",
"name": "10112"
"hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$",
"name": "$LOCATIONNAME$"
}'
output: '{
"errors": [
Expand All @@ -115,7 +115,7 @@ GetRegCenterByLangCodeAndHierarchyLevel:
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "-177",
"name": "10112"
"name": "$LOCATIONNAME$"
}'
output: '{
"errors": [
Expand All @@ -136,7 +136,7 @@ GetRegCenterByLangCodeAndHierarchyLevel:
outputTemplate: resident/error
input: '{
"langcode": "1234",
"hierarchylevel": "7",
"hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$",
"name": "Random"
}'
output: '{
Expand All @@ -158,8 +158,8 @@ GetRegCenterByLangCodeAndHierarchyLevel:
outputTemplate: resident/error
input: '{
"langcode": "",
"hierarchylevel": "5",
"name": "10112"
"hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$",
"name": "$LOCATIONNAME$"
}'
output: "404"

Expand All @@ -174,7 +174,7 @@ GetRegCenterByLangCodeAndHierarchyLevel:
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "",
"name": "10112"
"name": "$LOCATIONNAME$"
}'
output: "404"

Expand All @@ -188,7 +188,7 @@ GetRegCenterByLangCodeAndHierarchyLevel:
outputTemplate: resident/error
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "5",
"hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$",
"name": ""
}'
output: '{
Expand All @@ -198,100 +198,4 @@ GetRegCenterByLangCodeAndHierarchyLevel:
"message": "Registration Center not found"
}
]
}'

Resident_GetRegCenterByLangCodeAndHierarchyLevel_0_all_Valid_Smoke:
endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name}
description: Get registration center by language code and hierarchy level 0 with all valid inputs
role: resident
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel
outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "0",
"name": "MyCountry"
}'
output: '{
}'

Resident_GetRegCenterByLangCodeAndHierarchyLevel_1_all_Valid_Smoke:
endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name}
description: Get registration center by language code and hierarchy level 1 with all valid inputs
role: resident
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel
outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "1",
"name": "Rabat Sale Kenitra"
}'
output: '{
}'

Resident_GetRegCenterByLangCodeAndHierarchyLevel_2_all_Valid_Smoke:
endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name}
description: Get registration center by language code and hierarchy level 2 with all valid inputs
role: resident
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel
outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "2",
"name": "Rabat"
}'
output: '{
}'

Resident_GetRegCenterByLangCodeAndHierarchyLevel_3_all_Valid_Smoke:
endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name}
description: Get registration center by language code and hierarchy level 3 with all valid inputs
role: resident
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel
outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "3",
"name": "Rabat"
}'
output: '{
}'

Resident_GetRegCenterByLangCodeAndHierarchyLevel_4_all_Valid_Smoke:
endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name}
description: Get registration center by language code and hierarchy level 4 with all valid inputs
role: resident
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel
outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "4",
"name": "Assam"
}'
output: '{
}'

Resident_GetRegCenterByLangCodeAndHierarchyLevel_5_all_Valid_Smoke:
endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name}
description: Get registration center by language code and hierarchy level 5 with all valid inputs
role: resident
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel
outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult
input: '{
"langcode": "$1STLANG$",
"hierarchylevel": "5",
"name": "14022"
}'
output: '{
}'
Loading

0 comments on commit 50113e3

Please sign in to comment.