Skip to content

Commit

Permalink
Merge pull request #1308 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-33845
  • Loading branch information
ckm007 authored Aug 6, 2024
2 parents dda0abb + 659fe46 commit 716dae0
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,37 +104,10 @@ public static void main(String[] arg) {

BiometricDataProvider.generateBiometricTestData("Registration");

if (BaseTestCase.listOfModules.contains(GlobalConstants.MASTERDATA)) {
AdminTestUtil.getHierarchyZoneCode();
BaseTestCase.mapUserToZone();
BaseTestCase.mapZone();
AdminTestUtil.getLocationLevelData();
AdminTestUtil.getLocationData();
AdminTestUtil.getZoneName();



for (int i = 0; i < localLanguageList.size(); i++) {
BaseTestCase.languageList.clear();
BaseTestCase.languageList.add(localLanguageList.get(i));

DBManager.clearMasterDbData();
BaseTestCase.currentModule = GlobalConstants.MASTERDATA;
BaseTestCase.setReportName("masterdata-" + localLanguageList.get(i));
startTestRunner();

}

} else if (BaseTestCase.listOfModules.contains("auth")
|| BaseTestCase.listOfModules.contains(GlobalConstants.ESIGNET)) {
if (partnerKeyURL.isEmpty())
// if (partnerKeyURL.isEmpty() || ekycPartnerKeyURL.isEmpty())
LOGGER.error("partnerKeyURL is null");
else
startTestRunner();
} else {
if (partnerKeyURL.isEmpty() || ekycPartnerKeyURL.isEmpty())
LOGGER.error("partnerKeyURL is null");
else
startTestRunner();
}
} catch (Exception e) {
LOGGER.error("Exception " + e.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@ public void test(TestCaseDTO testCaseDTO)
String[] templateFields = testCaseDTO.getTemplateFields();
String inputJson = "";

if (!(BaseTestCase.certsForModule.equals("DSL-IDA") && (testCaseName.startsWith("Esignet_CreateOIDCClient")))) {
if (!(BaseTestCase.certsForModule.equals("DSL") && (testCaseName.startsWith("Esignet_CreateOIDCClient")))) {
inputJson = getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate());
} else {
{
inputJson = testCaseDTO.getInput();

}

String outputJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate());
Expand All @@ -145,21 +143,9 @@ public void test(TestCaseDTO testCaseDTO)
throw new AdminTestException("Failed at output validation");
}
} else {

String tempUrl = ConfigManager.getEsignetBaseUrl();

if (testCaseName.contains("_AuthorizationCode_")) {
response = postRequestWithCookieAuthHeaderAndXsrfTokenForAutoGenId(
tempUrl + testCaseDTO.getEndPoint(), inputJson, COOKIENAME, testCaseDTO.getTestCaseName(),
idKeyName);
} else {
response = postWithBodyAndBearerTokenForAutoGeneratedId(tempUrl + testCaseDTO.getEndPoint(),
inputJson, COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName(), idKeyName);
}
} {
response = postWithBodyAndCookieForAutoGeneratedId(ApplnURI + testCaseDTO.getEndPoint(), inputJson,
auditLogCheck, COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName(), idKeyName);
}
response = postWithBodyAndCookieForAutoGeneratedId(ApplnURI + testCaseDTO.getEndPoint(), inputJson,
auditLogCheck, COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName(), idKeyName);
}

Map<String, List<OutputValidationDto>> ouputValid = null;

Expand All @@ -171,7 +157,6 @@ public void test(TestCaseDTO testCaseDTO)
if (!OutputValidationUtil.publishOutputResult(ouputValid))
throw new AdminTestException("Failed at output validation");
}
}


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##### DB queries to be executed to tear down the data used and generated during the test rig run

delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=auth_pid%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=auth_ekyc_pid%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=auth_device_pid%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=auth_ftm_pid%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=partnernameforautomationesi%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=partnernameforesignet%'
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##### DB queries to be executed to tear down the data used and generated during the test rig run

delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=auth_pid%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=auth_ekyc_pid%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=auth_device_pid%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=auth_ftm_pid%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=partnernameforautomationesi%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=partnernameforesignet%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=auth_pid%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=auth_ekyc_pid%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=auth_device_pid%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=auth_ftm_pid%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=partnernameforautomationesi%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=partnernameforesignet%'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
##### DB queries to be executed to tear down the data used and generated during the test rig run

delete from master.ca_cert_store WHERE cert_subject LIKE '%O=auth_pid%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=auth_ekyc_pid%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=auth_device_pid%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=auth_ftm_pid%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=partnernameforautomationesi%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=partnernameforesignet%'

0 comments on commit 716dae0

Please sign in to comment.