Skip to content

Commit

Permalink
INJIMOB-1399
Browse files Browse the repository at this point in the history
Signed-off-by: Jayesh Kharode <[email protected]>
  • Loading branch information
Jayesh Kharode committed Dec 13, 2024
1 parent ef3d6c0 commit 5519191
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package io.mosip.testrig.dslrig.ivv.e2e.methods;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import io.mosip.testrig.apirig.dbaccess.DBManager;
import io.mosip.testrig.apirig.utils.ConfigManager;
import io.mosip.testrig.dslrig.ivv.core.base.StepInterface;
import io.mosip.testrig.dslrig.ivv.core.exceptions.RigInternalError;
import io.mosip.testrig.dslrig.ivv.orchestrator.BaseTestCaseUtil;
import io.mosip.testrig.dslrig.ivv.orchestrator.TestRunner;
import io.mosip.testrig.dslrig.ivv.orchestrator.dslConfigManager;

public class DeleteCertificatesAndOnboardingPartners extends BaseTestCaseUtil implements StepInterface {
public static Logger logger = Logger.getLogger(CheckRIDStage.class);

static {
if (dslConfigManager.IsDebugEnabled())
logger.setLevel(Level.ALL);
else
logger.setLevel(Level.ERROR);
}

@Override
public void run() throws RigInternalError {
DBManager.executeDBQueries(dslConfigManager.getKMDbUrl(), dslConfigManager.getKMDbUser(),
dslConfigManager.getKMDbPass(), dslConfigManager.getKMDbSchema(),
TestRunner.getGlobalResourcePath() + "/" + "config/keyManagerCertDataDeleteQueries.txt");
DBManager.executeDBQueries(dslConfigManager.getIdaDbUrl(), dslConfigManager.getIdaDbUser(),
dslConfigManager.getPMSDbPass(), dslConfigManager.getIdaDbSchema(),
TestRunner.getGlobalResourcePath() + "/" + "config/idaCertDataDeleteQueries.txt");
DBManager.executeDBQueries(dslConfigManager.getMASTERDbUrl(), dslConfigManager.getMasterDbUser(),
dslConfigManager.getMasterDbPass(), dslConfigManager.getMasterDbSchema(),
TestRunner.getGlobalResourcePath() + "/" + "config/masterDataCertDataDeleteQueries.txt");
}

}
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=masterdata_pid%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_ekyc_pid%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_device_pid%'
delete from ida.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_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=masterdata_pid%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_ekyc_pid%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_device_pid%'
delete from mosip_keymgr.keymgr.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_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=masterdata_pid%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=masterdata_ekyc_pid%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=masterdata_device_pid%'
delete from mosip_keymgr.keymgr.partner_cert_store WHERE cert_subject LIKE '%O=masterdata_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=masterdata_pid%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_ekyc_pid%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_device_pid%'
delete from master.ca_cert_store WHERE cert_subject LIKE '%O=masterdata_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%'
Original file line number Diff line number Diff line change
Expand Up @@ -19984,6 +19984,12 @@
"Action": "e2e_Center(DCOM,$$details3,3/*CENTER_INDEX*/)"
},
"Step-17": {
"Description": "Decomissions certificates and onboarding the partners",
"Input Parameters": "<<<Step inputs values details>>>",
"Return Value": "NA",
"Action": "e2e_DeleteCertificatesAndOnboardingPartners()"
},
"Step-18": {
"Description": "Write the persona data into a json file",
"Input Parameters": "NA",
"Return Value": "NA",
Expand Down

0 comments on commit 5519191

Please sign in to comment.