Skip to content

Commit

Permalink
MOSIP-36275 - Fixed automation issue for Upload certificate api and g…
Browse files Browse the repository at this point in the history
…et MISP License api (#951)

* MOSIP-36555 - Removed the OTPListener initializing and cleaned up

Signed-off-by: Mohanachandran S <[email protected]>

* MOSIP-36275 - Fixed automation failures

Signed-off-by: Mohanachandran S <[email protected]>

* MOSIP-36275 - Added output validation for get misp api

Signed-off-by: Mohanachandran S <[email protected]>

---------

Signed-off-by: Mohanachandran S <[email protected]>
  • Loading branch information
mohanachandran-s authored Oct 24, 2024
1 parent d52b689 commit c2cbcef
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,19 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
}

else {
response = getWithPathParamAndCookie(ApplnURI + testCaseDTO.getEndPoint(),
getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate()), auditLogCheck,
COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName());
}
Map<String, List<OutputValidationDto>> ouputValid = null;
if (testCaseName.contains("_StatusCode")) {
response = getWithPathParamAndCookie(ApplnURI + testCaseDTO.getEndPoint(),
getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate()), auditLogCheck,
COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName());
}
Map<String, List<OutputValidationDto>> ouputValid = null;

ouputValid = OutputValidationUtil.doJsonOutputValidation(response.asString(),
getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()), testCaseDTO,
response.getStatusCode());

ouputValid = OutputValidationUtil.doJsonOutputValidation(response.asString(),
getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()), testCaseDTO,
response.getStatusCode());

Reporter.log(ReportUtil.getOutputValidationReport(ouputValid));
if (!OutputValidationUtil.publishOutputResult(ouputValid))
throw new AdminTestException("Failed at output validation");
}
Reporter.log(ReportUtil.getOutputValidationReport(ouputValid));
if (!OutputValidationUtil.publishOutputResult(ouputValid))
throw new AdminTestException("Failed at output validation");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ GetMISPLicenseByMispID:
role: partner
restMethod: get
inputTemplate: partner/MispLicense/GetMISPLicenseByMispID/getMISPLicenseByMispID
outputTemplate: partner/error
outputTemplate: partner/MispLicense/GetMISPLicenseByMispID/getMISPLicenseByMispIDResult
input: '{
"mispId": "MISP-AUTOMATION"
}'
output: '{
"errors": [
{
"errorCode": "PMS_MSP_413"
}
]
"providerId": "MISP-AUTOMATION",
"licenseKeyStatus": "De-active"
}'

Partner_GetMISPLicenseByMispID__Active_allValid_smoke:
endPoint: /v1/partnermanager/misps/{mispId}/licenseKey
uniqueIdentifier: TC_PMS_GetMISPLicenseByMispID_02
Expand All @@ -29,8 +27,10 @@ GetMISPLicenseByMispID:
"mispId": "MISP2-AUTOMATION"
}'
output: '{
"providerId": "MISP2-AUTOMATION"
"providerId": "MISP2-AUTOMATION",
"licenseKeyStatus": "Active"
}'

Partner_GetMISPLicenseByMispID_inValid_smoke:
endPoint: /v1/partnermanager/misps/{mispId}/licenseKey
uniqueIdentifier: TC_PMS_GetMISPLicenseByMispID_03
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"response": {
"providerId": "{{providerId}}"
"providerId": "{{providerId}}",
"licenseKeyStatus": "{{licenseKeyStatus}}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uploadCACert:
role: partner
checkErrorsOnlyInResponse: true
restMethod: post
inputTemplate: partner/authPartner/UploadCertificate/uploadCertificate
inputTemplate: partner/authPartner/UploadCertificate/uploadCertificateFTM
outputTemplate: partner/authPartner/UploadCertificate/uploadCertificateResult
input: '{
"requesttime": "$TIMESTAMP$"
Expand Down

0 comments on commit c2cbcef

Please sign in to comment.