Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nandhu-kumar committed Oct 13, 2023
2 parents f27574c + e1eca5f commit c594169
Show file tree
Hide file tree
Showing 31 changed files with 393 additions and 78 deletions.
4 changes: 2 additions & 2 deletions automationtests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ WORKDIR /home/${container_user}

ENV work_dir=/home/${container_user}

ADD ./target/ $work_dir
ADD ./target/automationtests-*.jar $work_dir/automationtests.jar

ADD entrypoint.sh $work_dir/entrypoint.sh

Expand All @@ -55,4 +55,4 @@ ENV ENV_USER=
ENV ENV_ENDPOINT=
ENV ENV_TESTLEVEL=smokeAndRegression

ENTRYPOINT ["./entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -3038,7 +3038,7 @@ public String inputJsonKeyWordHandeler(String jsonString, String testCaseName) {
jsonString = replaceKeywordWithValue(jsonString, "$PUBLICKEYFORBINDING$",
MosipTestRunner.generatePublicKeyForMimoto());
}
if (jsonString.contains(GlobalConstants.PARTNER_ID)) {
if (jsonString.contains("$BLOCKEDPARTNERID$")) {
jsonString = replaceKeywordWithValue(jsonString, GlobalConstants.PARTNER_ID, getPartnerId());
}
if (jsonString.contains("$APIKEY$")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public void updateIdentity(TestCaseDTO testCaseDTO) throws AuthenticationTestExc
}

JSONObject req = new JSONObject(testCaseDTO.getInput());



JSONObject otpReqJson = null;
String otpRequest = null;
String sendOtpReqTemplate = null;
Expand Down Expand Up @@ -141,7 +144,19 @@ public void updateIdentity(TestCaseDTO testCaseDTO) throws AuthenticationTestExc
generatedRid = genRid;

String inputJson = getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate());




String phone = getValueFromAuthActuator("json-property", "phone_number");
String result = phone.replaceAll("\\[\"|\"\\]", "");

String email = getValueFromAuthActuator("json-property", "emailId");
String emailResult = email.replaceAll("\\[\"|\"\\]", "");


inputJson = inputJson.replace("\"phone\":", "\"" + result + "\":");
inputJson = inputJson.replace("\"email\":", "\"" + emailResult + "\":");

inputJson = inputJson.replace("$RID$", genRid);

if (inputJson.contains("$PRIMARYLANG$"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ delete from pms.partner where id in ('Tech-123','MOVP','DPP','MISP','MISP2','FTP
delete from auth_policy where cr_by='partner-111997'
delete from pms.auth_policy where name in('mosip policy','mosip policy2','mosip policy3','mosip data share policy','mosip data share policy2')
delete from policy_group where cr_by='partner-111997'
delete from pms.policy_group where name in ('mosip policy group','mosip policy role testing groupp','mosip policy group2','update_policy_group','mosip policy status testing groupp with policy')
delete from pms.policy_group where name in ('mosip policy group','mosip policy role testing groupp','mosip policy group2','update_policy_group','mosip policy status testing groupp with policy','mosip policy group for req key For_Req_Key_deactivaed_Policy','mosip policy group for req key For Update')
delete from pms.misp_license where cr_by='pm_testuser'
delete from pms.misp_license where misp_id in ('MISP','MISP2')
delete from pms.ftp_chip_detail where foundational_trust_provider_id='FTP'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ AddIdentity:
role: idrepo
restMethod: post
inputTemplate: idRepository/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: idRepository/error
outputTemplate: idRepository/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
Expand All @@ -679,11 +679,7 @@ AddIdentity:
"requesttime": "$TIMESTAMP$"
}'
output: '{
"errors": [
{
"errorCode": "IDR-IDC-002"
}
]
"status":"ACTIVATED"
}'
IdRepository_AddIdentity_with_Missing_phone:
endPoint: /idrepository/v1/identity/
Expand Down Expand Up @@ -724,7 +720,7 @@ AddIdentity:
role: idrepo
restMethod: post
inputTemplate: idRepository/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: idRepository/error
outputTemplate: idRepository/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
Expand All @@ -750,19 +746,15 @@ AddIdentity:
"requesttime": "$TIMESTAMP$"
}'
output: '{
"errors": [
{
"errorCode": "IDR-IDC-002"
}
]
"status":"ACTIVATED"
}'

IdRepository_AddIdentity_with_SpaceVal_phone:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: idRepository/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: idRepository/error
outputTemplate: idRepository/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
Expand All @@ -788,11 +780,7 @@ AddIdentity:
"requesttime": "$TIMESTAMP$"
}'
output: '{
"errors": [
{
"errorCode": "IDR-IDC-002"
}
]
"status":"ACTIVATED"
}'

IdRepository_AddIdentity_with_invalid_Email:
Expand Down Expand Up @@ -837,7 +825,7 @@ AddIdentity:
role: idrepo
restMethod: post
inputTemplate: idRepository/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: idRepository/error
outputTemplate: idRepository/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
Expand All @@ -863,11 +851,7 @@ AddIdentity:
"requesttime": "$TIMESTAMP$"
}'
output: '{
"errors": [
{
"errorCode": "IDR-IDC-002"
}
]
"status":"ACTIVATED"
}'
IdRepository_AddIdentity_with_Missing_Email:
endPoint: /idrepository/v1/identity/
Expand Down
2 changes: 1 addition & 1 deletion automationtests/src/main/resources/ida/BioAuth/BioAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ BioAuth:
input: '{
"bioSubType": "",
"bioType": "FACE",
"bioValue": "$FACEDRAFTVALUE$",
"bioValue": "$FACE$",
"deviceCode": "bc0b6848-6d45-46d1-a9bd-b334410bf823",
"dateTime": "$DATETIME$",
"deviceProviderID": "1873299273",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HotlistAPI:
inputTemplate: ida/BlockHotlistAPI/blockHotlistAPI
outputTemplate: ida/BlockHotlistAPI/blockHotlistAPIResult
input: '{
"id": "$PARTNERID$",
"id": "$BLOCKEDPARTNERID$",
"idType": "PARTNER_ID",
"requestTime": "$TIMESTAMP$",
"expiryTimestamp": ""
Expand Down
14 changes: 7 additions & 7 deletions automationtests/src/main/resources/ida/DemoAuth/DemoAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ DemoAuthNew:
"authStatus": "true"
}'
auth_DemoAuth_DOB_Valid_Smoke_VID_invalid_transaction_Pos:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$&idType=VID&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=1254@#45gg&id=$ID:GenerateVID_All_Valid_Smoke_Perpetual_sid_vid$&idType=VID&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/DemoAuth/DemoAuth
Expand Down Expand Up @@ -241,7 +241,7 @@ DemoAuthNew:
input: '{
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$",
"value": "$ID:AddIdentity_ValidParam_smoke_Pos_EMAIL$,
"value": "[email protected]",
"key": "emailId"
}'
output: '{
Expand Down Expand Up @@ -333,7 +333,7 @@ DemoAuthNew:
"language": "$PRIMARYLANG$",
"value": "Ner"
}
]
],
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$"
}'
Expand All @@ -358,7 +358,7 @@ DemoAuthNew:
"language": "$PRIMARYLANG$",
"value": "Ner"
}
]
],
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$"
}'
Expand All @@ -383,7 +383,7 @@ DemoAuthNew:
"language": "$PRIMARYLANG$",
"value": "Non-Foreigner"
}
]
],
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$"
}'
Expand All @@ -408,7 +408,7 @@ DemoAuthNew:
"language": "$PRIMARYLANG$",
"value": "Non-Foreigner"
}
]
],
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$"
}'
Expand All @@ -433,7 +433,7 @@ DemoAuthNew:
"language": "$PRIMARYLANG$",
"value": "Non-Foreigner"
}
]
],
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$"
}'
Expand Down
2 changes: 1 addition & 1 deletion automationtests/src/main/resources/ida/EkycBio/EkycBio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ EkycBio:
input: '{
"bioSubType": "",
"bioType": "FACE",
"bioValue": "$FACEDRAFTVALUE$",
"bioValue": "$FACE$",
"deviceCode": "bc0b6848-6d45-46d1-a9bd-b334410bf823",
"dateTime": "$DATETIME$",
"deviceProviderID": "1873299273",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ MultiFactorAuth:
"individualId": "$ID:AddIdentity_ValidParam_smoke_Pos_UIN$",
"bioSubType": "",
"bioType": "FACE",
"bioValue": "$FACEDRAFTVALUE$",
"bioValue": "$FACE$",
"deviceCode": "bc0b6848-6d45-46d1-a9bd-b334410bf823",
"dateTime": "$DATETIME$",
"deviceProviderID": "1873299273",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ HotlistAPI:
inputTemplate: ida/UnBlockHotlistAPI/UnblockHotlistAPI
outputTemplate: ida/UnBlockHotlistAPI/UnblockHotlistAPIResult
input: '{
"id": "$PARTNERID$",
"id": "$BLOCKEDPARTNERID$",
"idType": "PARTNER_ID",
"requestTime": "$TIMESTAMP$",
"expiryTimestamp": ""
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,9 @@ DeviceSpecSearch:
"id": "$IGNORE$",
"name": "Webcam",
"brand": "Logitech",
"model": "C270",
"model": "$IGNORE$",
"deviceTypeCode": "CMR",
"minDriverversion": "2.086",
"minDriverversion": "$IGNORE$",
"description": "$IGNORE$",
"langCode": "$IGNORE$",
"isActive": "$IGNORE$",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CreateDeviceSpecification:
output: '{
"errors": [
{
"errorCode": "KER-MSD-999"
"errorCode": "KER-MSD-054"
}
]
}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ GetMachineHistory:
Admin_GetMachineHistory_allValid_smoke:
endPoint: /v1/masterdata/machineshistories/{id}/{langcode}/{effdatetimes}
role: admin
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: masterdata/GetMachineHistory/getMachineHistory
outputTemplate: masterdata/GetMachineHistory/getMachineHistoryResult
Expand Down Expand Up @@ -79,7 +80,7 @@ GetMachineHistory:
output: '{
"errors": [
{
"errorCode": "$IGNORE$",
"errorCode": "KER-MSD-032",
"message": "$IGNORE$"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CreateLocationData:
input: '{
"code": "TST12",
"name": "Test_Loc_A_",
"hierarchyLevel": "0",
"hierarchyLevel": "$HIERARCHYLEVEL$",
"hierarchyName": "$HIERARCHYNAME$",
"parentLocCode": "$PARENTLOCCODE$",
"langCode": "eng",
Expand All @@ -35,7 +35,7 @@ CreateLocationData:
input: '{
"code": "",
"name": "Test_Loc_1_A",
"hierarchyLevel":"4",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"$HIERARCHYNAME$",
"parentLocCode":"$PARENTLOCCODE$",
"langCode": "eng",
Expand All @@ -60,7 +60,7 @@ CreateLocationData:
input: '{
"code": "NST",
"name": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxy",
"hierarchyLevel":"4",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"$HIERARCHYNAME$",
"parentLocCode":"$PARENTLOCCODE$",
"langCode": "eng",
Expand All @@ -85,7 +85,7 @@ CreateLocationData:
input: '{
"code": "NST",
"name": "",
"hierarchyLevel":"4",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"$HIERARCHYNAME$",
"parentLocCode":"$PARENTLOCCODE$",
"langCode": "eng",
Expand Down Expand Up @@ -135,7 +135,7 @@ CreateLocationData:
input: '{
"code": "NST",
"name": "NDATA",
"hierarchyLevel":"11",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"$HIERARCHYNAME$",
"parentLocCode":"$PARENTLOCCODE$",
"langCode": "eng",
Expand All @@ -160,7 +160,7 @@ CreateLocationData:
input: '{
"code": "NST",
"name": "NDATA",
"hierarchyLevel":"3",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm",
"parentLocCode":"$PARENTLOCCODE$",
"langCode": "eng",
Expand All @@ -185,7 +185,7 @@ CreateLocationData:
input: '{
"code": "NST",
"name": "NDATA",
"hierarchyLevel":"3",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"",
"parentLocCode":"$PARENTLOCCODE$",
"langCode": "eng",
Expand All @@ -210,7 +210,7 @@ CreateLocationData:
input: '{
"code": "NST",
"name": "NDATA",
"hierarchyLevel":"4",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"$HIERARCHYNAME$",
"parentLocCode":"fbheafg",
"langCode": "eng",
Expand All @@ -237,7 +237,7 @@ CreateLocationData:
input: '{
"code": "NST",
"name": "NDATA",
"hierarchyLevel":"3",
"hierarchyLevel":"$HIERARCHYLEVEL$",
"hierarchyName":"$HIERARCHYNAME$",
"parentLocCode":"$PARENTLOCCODE$",
"langCode": "eng",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ SearchDocCategories:
role: admin
templateFields: ["languageCode"]
restMethod: post
checkErrorsOnlyInResponse: true
inputTemplate: masterdata/SearchDocCategories/searchDocCategories
outputTemplate: masterdata/SearchDocCategories/searchDocCategoriesResult
input: '{
Expand Down Expand Up @@ -108,7 +109,7 @@ SearchDocCategories:
{
"isActive": "$IGNORE$",
"description": "$IGNORE$",
"code": "POA",
"code": "$IGNORE$",
"langCode": "$IGNORE$",
"name": "$IGNORE$"
}
Expand Down
Loading

0 comments on commit c594169

Please sign in to comment.