Skip to content

Commit

Permalink
MOSIP-34265
Browse files Browse the repository at this point in the history
Signed-off-by: Sohan Kumar Dey <[email protected]>
  • Loading branch information
Sohandey committed Jul 5, 2024
1 parent 778d2af commit 5f22cd2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ public static void clearPartnerRevampDbData() {
}
}

public static void clearKeyManagerDbDataForPartnerRevamp() {
Session session = null;
try {
session = getDataBaseConnection(ConfigManager.getKMDbUrl(), ConfigManager.getKMDbUser(),
ConfigManager.getKMDbPass(), ConfigManager.getKMDbSchema());
executeQueries(session, MosipTestRunner.getGlobalResourcePath() + "/" + "config/partnerRevampDataDeleteQueriesForKeyMgr.txt");
} catch (Exception e) {
logger.error("Error:: While executing PMS DB Quiries." + e.getMessage());
} finally {
if (session != null) {
session.close();
}
}
}

public static void clearKeyManagerDbData() {
Session session = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ public static void suiteSetup() {
if (listOfModules.contains(GlobalConstants.PARTNERNEW)) {
BaseTestCase.currentModule = GlobalConstants.PARTNERNEW;
DBManager.clearPartnerRevampDbData();
DBManager.clearKeyManagerDbDataForPartnerRevamp();
//DBManager.clearKeyManagerDbData();
BaseTestCase.currentModule = GlobalConstants.PARTNERNEW;
setReportName(GlobalConstants.PARTNERNEW);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ public class AdminTestUtil extends BaseTestCase {
String prerequisiteAutoGeneratedIdPropFileName = properties.getProperty("prerequisiteAutoGeneratedIdPropFileName");
String regProcAutoGeneratedIdPropFileName = properties.getProperty("regProcAutoGeneratedIdPropFileName");
String mimotoAutoGeneratedIdPropFileName = properties.getProperty("mimotoAutoGeneratedIdPropFileName");

String pmsAutoGeneratedIdPropFileName = properties.getProperty("pmsAutoGeneratedIdPropFileName");

public static final String PASSWORD_FOR_ADDIDENTITY_AND_REGISTRATION = properties
.getProperty("passwordForAddIdentity");
public static final String PASSWORD_TO_RESET = properties.getProperty("passwordToReset");
Expand Down Expand Up @@ -4031,6 +4032,8 @@ else if (testCaseName.toLowerCase().startsWith(GlobalConstants.PREREG))
autoGenFileName = preregAutoGeneratedIdPropFileName;
else if (testCaseName.toLowerCase().startsWith(GlobalConstants.PARTNER))
autoGenFileName = partnerAutoGeneratedIdPropFileName;
else if (testCaseName.toLowerCase().startsWith(GlobalConstants.PARTNERNEW))
autoGenFileName = pmsAutoGeneratedIdPropFileName;
else if (testCaseName.toLowerCase().startsWith("idrepo"))
autoGenFileName = idrepoAutoGeneratedIdPropFileName;
else if (testCaseName.toLowerCase().startsWith(GlobalConstants.RESIDENT))
Expand All @@ -4045,6 +4048,9 @@ else if (testCaseName.toLowerCase().startsWith(GlobalConstants.MIMOTO))
autoGenFileName = mimotoAutoGeneratedIdPropFileName;
else if (testCaseName.toLowerCase().startsWith(GlobalConstants.ESIGNET))
autoGenFileName = esignetAutoGeneratedIdPropFileName;
else if (testCaseName.toLowerCase().startsWith(GlobalConstants.PARTNERNEW))
autoGenFileName = pmsAutoGeneratedIdPropFileName;

else {
autoGenFileName = "default";
logger.info("testCaseName: " + testCaseName);
Expand Down
18 changes: 10 additions & 8 deletions apitest-commons/src/main/resources/config/Kernel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ pmsAuthInternal=true
mosip_pms_app_id=partner
partner_password=mosip123
partner_userName=111997
partner_revamp_userName=111999
partner_user_password=mosip123
mosip_pms_client_id=mosip-pms-client
mosip_partner_client_id=mosip-partner-client
Expand Down Expand Up @@ -168,11 +169,12 @@ mosip_testrig_client_id=mosip-testrig-client
mosip_testrig_client_secret=AonuXbikoWmHP5ug

keycloak-realm-id=mosip
iam-users-to-create=111997,111998,220005,111992,globaladmin,111887
iam-users-to-create=111997,111998,220005,111992,globaladmin,111887,111999
#iam-users-to-create=111997,220005,111992
iam-users-password=mosip123,mosip123,mosip123,mosip123,mosip123
roles.220005=GLOBAL_ADMIN,ID_AUTHENTICATION,REGISTRATION_ADMIN,REGISTRATION_SUPERVISOR,ZONAL_ADMIN
roles.111997=AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_SUPERVISOR
roles.111999=AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,POLICYMANAGER,REGISTRATION_SUPERVISOR
roles.111887=AUTH_PARTNER,PARTNER_ADMIN,PMS_ADMIN,REGISTRATION_SUPERVISOR
roles.111998=POLICYMANAGER
roles.111992=GLOBAL_ADMIN
Expand Down Expand Up @@ -205,7 +207,7 @@ s3-region=null
reportExpirationInDays=3
s3-account-for-persona-data=personaData
# supported values yes or no
push-reports-to-s3=no
push-reports-to-s3=yes
enableDebug=yes
# supported values are 1 to 8
threadCount=1
Expand All @@ -230,12 +232,12 @@ ida_db_schema=ida

#----------------------------------AuthDemoService Host properties----------------------------------------------------------#
#To run locally
authDemoServiceBaseURL=http://localhost
authDemoServicePort=8082
#authDemoServiceBaseURL=http://localhost
#authDemoServicePort=8082

#To run in Docker
#authDemoServiceBaseURL=http://authdemo.apitestrig
#authDemoServicePort=80
authDemoServiceBaseURL=http://authdemo.apitestrig
authDemoServicePort=80


#----------------------------------e-Signet properties----------------------------------------------------------#
Expand All @@ -254,10 +256,10 @@ esignetWellKnownEndPoint=/v1/esignet/oidc/.well-known/openid-configuration
signupSettingsEndPoint=/v1/signup/settings

#To run in Docker
#authCertsPath=/home/mosip/authcerts
authCertsPath=/home/mosip/authcerts

#To run locally
authCertsPath=
#authCertsPath=
preconfiguredOtp=111111
usePreConfiguredOtp=true

Expand Down

0 comments on commit 5f22cd2

Please sign in to comment.