Skip to content

Commit

Permalink
Merge pull request mosip#1030 from Sohandey/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Sohandey authored Sep 6, 2023
2 parents 5178983 + c0efb8d commit 3ae07d5
Show file tree
Hide file tree
Showing 26 changed files with 364 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void execute(Connection connection) throws SQLException {
});
}
}
private static Session getDataBaseConnection(String dburl, String userName, String password, String schema) {
public static Session getDataBaseConnection(String dburl, String userName, String password, String schema) {
SessionFactory factory = null;
Session session = null;
logger.info("dburl : " + dburl + " userName : " + userName + " password : " + password);
Expand Down
27 changes: 27 additions & 0 deletions automationtests/src/main/resources/ida/AddIdentity/AddIdentity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,33 @@ AddIdentity:
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'
auth_AddIdentity_deactivate_UIN_smoke:
endPoint: /idrepository/v1/identity/
role: idrepo
regenerateHbs: true
restMethod: post
inputTemplate: ida/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: ida/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1970/07/08",
"postalCode": "14022",
"email": "[email protected]",
"phone": "7019858531",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
Expand Down
33 changes: 33 additions & 0 deletions automationtests/src/main/resources/ida/BioAuth/BioAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1444,4 +1444,37 @@ BioAuth:
}
],
"authStatus": false
}'
auth_BioAuth_With_Deactivated_UIN:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&id=$ID:AddIdentity_deactivate_UIN_smoke_UIN$&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/BioAuth/BioAuth
outputTemplate: ida/BioAuth/error
input: '{
"bioSubType": "",
"bioType": "FACE",
"bioValue": "$FACE$",
"deviceCode": "bc0b6848-6d45-46d1-a9bd-b334410bf823",
"dateTime": "$DATETIME$",
"deviceProviderID": "1873299273",
"deviceServiceID": "",
"deviceServiceVersion": "SB.WIN.001",
"deviceProvider": "SYNCBYTE",
"deviceProviderId": "SYNCBYTE.LTC165",
"deviceSubType": "Single",
"make": "Logitech",
"model": "4d36e96c-e325-11ce-bfc1-08002be10318",
"serialNo": "78467171",
"type": "Face",
"transactionId": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
}'
output: '{
"errors": [
{
"errorCode": "IDA-MLC-019"
}
],
"authStatus": false
}'
14 changes: 14 additions & 0 deletions automationtests/src/main/resources/ida/CreateDraft/CreateDraft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CreateDraft:
auth_CreateDraft_Smoke_Pos:
endPoint: /idrepository/v1/identity/draft/create/{registrationId}
role: idrepo
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/CreateDraft/createDraft
outputTemplate: ida/CreateDraft/createDraftResult
input: '{
"registrationId":"$RID$"
}'
output: '{
"status": "DRAFTED"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"registrationId": "{{registrationId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CreateDraftVID:
auth_CreateDraftVID_Smoke_Pos:
endPoint: /idrepository/v1/draft/vid
role: idrepo
restMethod: post
inputTemplate: ida/CreateDraftVID/createDraftVID
outputTemplate: ida/CreateDraftVID/createDraftVIDResult
input: '{
"vidType": "Perpetual",
"UIN": "$ID:GetDraft_all_valid_smoke_sid_UIN$"
}'
output: '{
"vidStatus": "DRAFT"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "mosip.vid.create",
"version": "v1",
"requesttime": "$TIMESTAMP$",
"metadata": {},
"request": {
"vidType": "{{vidType}}",
"UIN": "{{UIN}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"response": {
"vidStatus": "{{vidStatus}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DeactivateUINs:
auth_DeactivateUINs_Smoke_Pos:
endPoint: /idrepository/v1/vid/deactivate
role: resident
restMethod: post
inputTemplate: ida/DeactivateUin/deactivateUin
outputTemplate: ida/DeactivateUin/deactivateUinResult
input: '{
"UIN": "$ID:AddIdentity_deactivate_UIN_smoke_UIN$",
"requesttime": "$TIMESTAMP$",
"id": "mosip.vid.deactivate",
"version": "v1"
}'
output: '{
"vidStatus": "DEACTIVATED"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "{{id}}",
"metadata": {},
"request": {
"UIN": "{{UIN}}"
},
"requesttime": "{{requesttime}}",
"version": "{{version}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"response": {
"vidStatus": "{{vidStatus}}"
}
}
15 changes: 15 additions & 0 deletions automationtests/src/main/resources/ida/DemoAuth/DemoAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -772,4 +772,19 @@ DemoAuthNew:
}'
output: '{
"authStatus": "false"
}'
auth_DemoAuth_with_Deactivated_UIN:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_deactivate_UIN_smoke_UIN$&idType=UIN&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/DemoAuth/DemoAuth
outputTemplate: ida/error
input: '{
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$",
"value": "1970/07/08",
"key": "dob"
}'
output: '{
"authStatus": "false"
}'
28 changes: 28 additions & 0 deletions automationtests/src/main/resources/ida/EkycBio/EkycBio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1230,4 +1230,32 @@ EkycBio:
}'
output: '{
"kycStatus": "false"
}'
auth_EkycBio_Face_With_Deactivated_uin:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$id=$ID:AddIdentity_deactivate_UIN_smoke_UIN$&isKyc=true&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/EkycBio/EkycBio
outputTemplate: ida/EkycBio/EkycBioResult
input: '{
"bioSubType": "",
"bioType": "FACE",
"bioValue": "$FACE$",
"deviceCode": "bc0b6848-6d45-46d1-a9bd-b334410bf823",
"dateTime": "$DATETIME$",
"deviceProviderID": "1873299273",
"deviceServiceID": "",
"deviceServiceVersion": "SB.WIN.001",
"deviceProvider": "SYNCBYTE",
"deviceProviderId": "SYNCBYTE.LTC165",
"deviceSubType": "Single",
"make": "Logitech",
"model": "4d36e96c-e325-11ce-bfc1-08002be10318",
"serialNo": "78467171",
"type": "Face",
"transactionId": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
}'
output: '{
"kycStatus": "true"
}'
17 changes: 16 additions & 1 deletion automationtests/src/main/resources/ida/EkycDemo/EkycDemo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ EkycDemo:
role: resident
restMethod: post
inputTemplate: ida/EkycDemo/EkycDemo
outputTemplate: ida/EkycDemo/EkycDemoResult
outputTemplate: ida/EkycDemo/error
input: '{
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$",
Expand All @@ -858,4 +858,19 @@ EkycDemo:
}
],
"kycStatus": false
}'
auth_EkycDemo_Auth_With_Deactivated_UIN:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_deactivate_UIN_smoke_UIN$&isKyc=true&partnerUrlSuffix=$PartnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
restMethod: post
inputTemplate: ida/EkycDemo/EkycDemo
outputTemplate: ida/EkycDemo/error
input: '{
"timestamp": "$TIMESTAMP$",
"transactionId": "$TRANSACTIONID$",
"value": "1970/07/08",
"key": "dob"
}'
output: '{
"kycStatus": "true"
}'
13 changes: 13 additions & 0 deletions automationtests/src/main/resources/ida/GetDraft/GetDraft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GetDraft:
auth_GetDraft_all_valid_smoke_sid:
endPoint: /idrepository/v1/identity/draft/{registrationId}
role: idrepo
restMethod: get
inputTemplate: ida/GetDraft/getDraft
outputTemplate: ida/GetDraft/getDraftResult
input: '{
"registrationId":"$RID$"
}'
output: '{
"status": "DRAFT"
}'
3 changes: 3 additions & 0 deletions automationtests/src/main/resources/ida/GetDraft/getDraft.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"registrationId": "{{registrationId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"response": {
"status": "{{status}}"
}
}
38 changes: 38 additions & 0 deletions automationtests/src/main/resources/ida/OtpAuth/OtpAuth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,42 @@ OtpAuth:
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'
auth_OTP_Auth_With_InValid_OTP:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_For_Otp_Auth_smoke_Pos_UIN$&partnerUrlSuffix=$partnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/OtpAuth/OtpAuth
outputTemplate: ida/OtpAuth/OtpAuthResult
input: '{
"otp": "12S34@@!#",
"individualId": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_UIN$",
"transactionID": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
}'
output: '{
"authStatus": "false",
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'
auth_OTP_Auth_With_WRONG_OTP:
endPoint: /v1/identity/authenticate?moduleName=$MODULENAME$&certsDir=$CERTSDIR$&transactionId=$TRANSACTIONID$&id=$ID:AddIdentity_For_Otp_Auth_smoke_Pos_UIN$&partnerUrlSuffix=$partnerKeyURL$&keyFileNameByPartnerName=true&partnerName=$PartnerName$
role: resident
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: ida/OtpAuth/OtpAuth
outputTemplate: ida/OtpAuth/OtpAuthResult
input: '{
"otp": "128276454",
"individualId": "$ID:AddIdentity_For_Otp_Auth_smoke_Pos_UIN$",
"transactionID": "$TRANSACTIONID$",
"timestamp": "$TIMESTAMP$"
}'
output: '{
"authStatus": "false",
"sendOtpResp":{
"sendOtpResTemplate":"ida/OtpAuth/sendOtpRes"
}
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"id": "mosip.identity.otp",
"version": "1.0",
"transactionID": "{{transactionID}}",
"requestTime": "{{requestTime}}",
"individualId": "{{individualId}}",
"otpChannel": [
"PHONE"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PublishDraft:
auth_PublishDraft_all_valid_smoke:
endPoint: /idrepository/v1/identity/draft/publish/{registrationId}
role: idrepo
restMethod: get
inputTemplate: ida/PublishDraft/publishDraft
outputTemplate: ida/PublishDraft/publishDraftResult
input: '{
"registrationId":"$RID$"
}'
output: '{
"status": "ACTIVATED"
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"registrationId": "{{registrationId}}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"response": {
"status": "{{status}}"
}
}
26 changes: 26 additions & 0 deletions automationtests/src/main/resources/ida/UpdateDraft/UpdateDraft.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"response": {
"status": "{{status}}"
}
}
Loading

0 comments on commit 3ae07d5

Please sign in to comment.