Skip to content

Commit

Permalink
automated new apis
Browse files Browse the repository at this point in the history
Signed-off-by: Sohan Kumar Dey <[email protected]>
  • Loading branch information
Sohandey committed Jan 10, 2025
1 parent d80631e commit 8ac44a0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,12 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
auditLogCheck = testCaseDTO.isAuditLogCheck();


String responseJson = RestClient.getRequestWithCookie(
ApplnURI + "/v1/partnermanager/partners/root-certificates",
MediaType.APPLICATION_JSON,
MediaType.APPLICATION_JSON,
COOKIENAME, "partnerrevamp").asString();

JSONObject jsonObject = new JSONObject(responseJson);

response = getWithPathParamAndCookie(ApplnURI + "/v1/partnermanager/partners/root-certificates",
getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate()), auditLogCheck,
COOKIENAME, "partnerrevamp", testCaseDTO.getTestCaseName());
String responseBody = response.getBody().asString();
JSONObject jsonObject = new JSONObject(responseBody);
JSONArray dataArray = jsonObject.getJSONObject("response").getJSONArray("data");

String certId = "";
Expand All @@ -117,11 +116,11 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
}
String url="/v1/partnermanager/partners/download-root-certificate/"+certId;

response = RestClient.getRequestWithCookie(
ApplnURI + url,
MediaType.APPLICATION_JSON,
MediaType.APPLICATION_JSON,
COOKIENAME, "partnerrevamp");
response = getWithPathParamAndCookie(ApplnURI + url,
getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate()), auditLogCheck,
COOKIENAME, "partnerrevamp", testCaseDTO.getTestCaseName());



Map<String, List<OutputValidationDto>> ouputValid = null;
if (testCaseName.contains("_StatusCode")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ DownloadRootCertificate:
endPoint: /v1/partnermanager/partners/download-root-certificate/
description: Fetching all the root certificates of the Logged in Partner
role: partnerrevamp
checkErrorsOnlyInResponse: true
restMethod: get
inputTemplate: pms/GetAllRootCertificate/getAllRootCertificate
outputTemplate: pms/GetAllRootCertificate/getAllRootCertificateResult
inputTemplate: pms/DownloadRootCertificate/downloadRootCertificate
outputTemplate: pms/DownloadRootCertificate/downloadRootCertificateResult
input: '{
}'
output: '{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
{
"response": {
}
}
8 changes: 4 additions & 4 deletions api-test/testNgXmlFiles/pmsApi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<listener class-name="io.mosip.testrig.apirig.report.EmailableReport" />
</listeners>

<test name="CreatePolicyGroup">
<!-- <test name="CreatePolicyGroup">
<parameter name="ymlFile"
value="pms/DefinePolicyGroup/DefinePolicyGroup.yml" />
<parameter name="idKeyName" value="id" />
Expand Down Expand Up @@ -217,7 +217,7 @@
</classes>
</test>
<!--<test name="GetAllApprovedAuthPartnerPolicy">
<test name="GetAllApprovedAuthPartnerPolicy">
<parameter name="ymlFile"
value="pms/GetAllApprovedAuthPartnerPolicy/GetAllApprovedAuthPartnerPolicy.yml" />
<classes>
Expand All @@ -231,7 +231,7 @@
<classes>
<class name="io.mosip.testrig.apirig.testscripts.GetWithParam" />
</classes>
</test>-->
</test>
<test name="GetAllApiKeyForAuthPartnerBeforeApikeyGenerated">
<parameter name="ymlFile"
Expand Down Expand Up @@ -679,7 +679,7 @@
<class name="io.mosip.testrig.apirig.testscripts.GetWithParam" />
</classes>
</test>
<test name="DownloadRootCertificate">
--> <test name="DownloadRootCertificate">
<parameter name="ymlFile" value="pms/DownloadRootCertificate/DownloadRootCertificate.yml" />
<classes>
<class name="io.mosip.testrig.apirig.testscripts.DownloadRootCertificate" />
Expand Down

0 comments on commit 8ac44a0

Please sign in to comment.