Skip to content

Commit

Permalink
MOSIP-38953 Incorporate API changes for admin (#1093)
Browse files Browse the repository at this point in the history
* MOSIP-36647

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-37915

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-34116

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-37889

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-38558

Signed-off-by: Anup Nehe <[email protected]>

* reslove conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-38953

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>
Signed-off-by: Mayura Deshmukh <[email protected]>
Co-authored-by: Mayura Deshmukh <[email protected]>
  • Loading branch information
anup-nehe and mayuradesh authored Jan 16, 2025
1 parent 79e6950 commit 6347c38
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "mosip.pms.deactivate.policy.patch",
"policyId": "{{policyId}}",
"version": "1.0",
"requestTime": "{{requestTime}}",
"request": {
"status": "{{status}}"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DeactivatePolicy:
Pms_DeactivatePolicy_After_Publish_All_Valid_Smoke:
endPoint: /v1/policymanager/policies/{policyId}
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: patch
inputTemplate: pms/DeactivatePolicy/DeactivatePolicy
outputTemplate: pms/DeactivatePolicy/DeactivatePolicyResult
input: '{
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_For_Deactive_pms_sid_id$",
"requestTime": "$TIMESTAMP$",
"status": "De-Activate"
}'
output: ' {

}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ DeactivatePolicyGroup:
description: Deactivate Policy Groups
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: get
restMethod: patch
inputTemplate: pms/DeactivatePolicyGroup/deactivatePolicyGroup
outputTemplate: pms/DeactivatePolicyGroup/deactivatePolicyGroupResult
input: '{
"status": "De-Activate",
"requestTime": "$TIMESTAMP$",
"policyGroupId": "$ID:DefinePolicyGroup_create_then_deactivate_sid_id$"
}'
output: ' {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"policyGroupId":"{{policyGroupId}}"

"id": "mosip.pms.deactivate.policy.group.patch",
"policyGroupId": "{{policyGroupId}}",
"version": "1.0",
"requestTime": "{{requestTime}}",
"request": {
"status": "{{status}}"
}
}
24 changes: 24 additions & 0 deletions api-test/src/main/resources/pms/DefinePolicy/DefinePolicy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -683,3 +683,27 @@ definePolicy:
"is_Active": false
}'

Pms_DefinePolicy_All_Valid_Smoke_For_Deactive_pms_sid:
endPoint: /v1/policymanager/policies
description: Creating a Policy using PolicyGroup
role: partnerrevamp
restMethod: post
inputTemplate: pms/DefinePolicy/definePolicy
outputTemplate: pms/DefinePolicy/definePolicyResult
input: '{
"desc": "desc deactive mosip policy 19234",
"name": "mosip deactive policy 19234",
"attributeName": "fullName",
"authTokenType": "policy",
"policyGroupName": "mosip policy group 19234",
"policyType": "Auth",
"version": "1.0",
"requesttime": "$TIMESTAMP$"
}'
output: ' {
"policyGroupName": "mosip policy group 19234",
"name": "$IGNORE$",
"desc": "$IGNORE$",
"is_Active": false
}'

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GetAllApprovedAuthPartnerId:
Pms_GetAllApprovedAuthPartnerId_allValid_smoke:
endPoint: /v1/partnermanager/partners/v4?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner
endPoint: /v1/partnermanager/partners/v3?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner
description: Fetching all approved Partner Id
role: partnerrevamp
restMethod: get
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GetAllApprovedPartnerId:
Pms_GetAllApprovedAuthPartnerId_without_auth:
endPoint: /v1/partnermanager/partners/v4?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner
endPoint: /v1/partnermanager/partners/v3?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner
description: Fetching all approved Partner Id without token
role: invalidtoken
restMethod: get
Expand All @@ -16,7 +16,7 @@ GetAllApprovedPartnerId:
]
}'
Pms_GetAllApprovedAuthPartnerId_invalid_auth:
endPoint: /v1/partnermanager/partners/v4?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner
endPoint: /v1/partnermanager/partners/v3?status=approved&policyGroupAvailable=true&partnerType=Auth_Partner
description: Fetching all approved Partner Id with invalid token
role: invalidtoken
restMethod: get
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GetDetailsOfPartner:
Pms_GetDetailsOfPartner_All_Valid_Smoke:
endPoint: /v1/partnermanager/partners/{partnerId}/v2
endPoint: /v1/partnermanager/admin-partners/{partnerId}
description: Fetching all the details of the Partner Id
role: partnerrevamp
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GetListOfAllDevice:
Pms_GetListOfAllDevice_All_Valid_Smoke:
endPoint: /v1/partnermanager/devicedetail/search/v2
endPoint: /v1/partnermanager/devicedetail
uniqueIdentifier: TC_PMS_devicedetails_01
description: Fetching list of all the devices
role: partnerrevamp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GetListOfPartners:
Pms_GetListOfPartners_All_Valid_Smoke:
endPoint: /v1/partnermanager/partners/v3
endPoint: /v1/partnermanager/admin-partners
description: Fetching all the active List Of Partnered in the system
role: partnerrevamp
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GetListOfPolicies:
Pms_GetListOfPolicies_All_Valid_Smoke:
endPoint: /v1/policymanager/policies/search/v2
endPoint: /v1/policymanager/policies/v2
description: Fetching all the active List Of Policies in the system
role: partnerrevamp
checkErrorsOnlyInResponse: true
Expand Down
29 changes: 28 additions & 1 deletion api-test/src/main/resources/pms/PublishPolicy/PublishPolicy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,32 @@ createPublishPolicy:
]
}'


Pms_PublishPolicy_All_Valid_Smoke:
endPoint: /v1/policymanager/policies/{policyId}/group/{policygroupId}/publish
description: Publish The Policy
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: pms/PublishPolicy/publishPolicy
outputTemplate: pms/PublishPolicy/publishPolicyResult
input: '{
"policygroupId": "$ID:DefinePolicyGroup_All_Valid_Smoke_pms_sid_id$",
"policyId": "$ID:DefinePolicy_All_Valid_Smoke_For_Deactive_pms_sid_id$",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"policyGroupName": "$IGNORE$",
"policyGroupDesc": "$IGNORE$",
"policyGroupStatus": true,
"policyName": "$IGNORE$",
"policyDesc": "$IGNORE$",
"policyType": "Auth",
"status": "PUBLISHED",
"is_Active": true,
"authType": "$IGNORE$",
"authSubType": "$IGNORE$",
"mandatory": "$IGNORE$",
"attributeName": "$IGNORE$",
"authTokenType": "$IGNORE$"
}'

11 changes: 10 additions & 1 deletion api-test/testNgXmlFiles/pmsApi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@

<test name="DeactivatePolicyGroup">
<parameter name="ymlFile" value="pms/DeactivatePolicyGroup/DeactivatePolicyGroup.yml" />
<parameter name="pathParams" value="policyGroupId" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.PatchWithPathParam" />
<class name="io.mosip.testrig.apirig.testscripts.PatchWithPathParamsAndBody" />
</classes>
</test>
<test name="DefinePolicy">
Expand All @@ -44,6 +45,14 @@
name="io.mosip.testrig.apirig.testscripts.PostWithOnlyPathParam" />
</classes>
</test>

<test name="DeactivatePolicy">
<parameter name="ymlFile" value="pms/DeactivatePolicy/DeactivatePolicy.yml" />
<parameter name="pathParams" value="policyId" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.PatchWithPathParamsAndBody" />
</classes>
</test>

<test name="GetAllActivePolicyGroups">
<parameter name="ymlFile"
Expand Down

0 comments on commit 6347c38

Please sign in to comment.