Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohandey committed Oct 31, 2023
2 parents 1ddfe47 + 8817d0f commit 6ad5a5e
Show file tree
Hide file tree
Showing 3 changed files with 408 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public class ConfigManager {
private static String MOSIP_REG_CLIENT_SECRET = "mosip_reg_client_secret";
private static String MOSIP_REG_CLIENT_ID = "mosip_reg_client_id";
private static String MOSIP_REGCLIENT_APP_ID = "mosip_regclient_app_id";

private static String MOSIP_REGPROC_CLIENT_SECRET = "mosip_regproc_client_secret";
private static String MOSIP_REGPROC_CLIENT_ID = "mosip_regproc_client_id";
private static String MOSIP_REGPROC_APP_ID = "mosip_regprocclient_app_id";

private static String MOSIP_IDA_CLIENT_SECRET = "mosip_ida_client_secret";
private static String MOSIP_IDA_CLIENT_ID = "mosip_ida_client_id";
private static String MOSIP_IDA_APP_ID = "mosip_ida_app_id";
Expand Down Expand Up @@ -108,6 +108,9 @@ public class ConfigManager {
private static String ESIGNET_DEPLOYED = "eSignetDeployed";
private static String esignet_deployed;

private static String USE_EXTERNAL_SCENARIO_SHEET = "useExternalScenarioSheet";
private static String useExternalScenario_sheet;

private static String AUTH_DEMO_SERVICE_PORT = "authDemoServicePort";
private static String AUTH_DEMO_SERVICE_BASE_URL = "authDemoServiceBaseURL";
private static String MOUNT_PATH = "mountPath";
Expand All @@ -119,13 +122,16 @@ public class ConfigManager {
private static String REPORT_EXPIRATION_IN_DAYS = "reportExpirationInDays";

private static String SCENARIOS_TO_BE_SKIPPED = "scenariosToSkip";
private static String ADMIN_USER_NAME = "admin_userName";

private static String SCENARIOS_TO_BE_EXECUTED = "scenariosToExecute";

private static String ADMIN_USER_NAME = "admin_userName";

private static String PARTNER_URL_SUFFIX = "partnerUrlSuffix";

private static String partnerUrlSuffix;

private static String toSkippedList;
private static String toExecuteList;
private static String userAdminName;

private static String pms_client_secret;
Expand All @@ -134,8 +140,6 @@ public class ConfigManager {
private static String pms_app_id;
private static String partner_client_id;



private static String resident_client_secret;
private static String resident_client_id;
private static String resident_app_id;
Expand All @@ -154,7 +158,7 @@ public class ConfigManager {
private static String regproc_client_secret;
private static String regproc_client_id;
private static String regproc_app_id;

private static String regprocessor_client_secret;
private static String regprocessor_client_id;
private static String regprocessor_app_id;
Expand Down Expand Up @@ -183,7 +187,7 @@ public class ConfigManager {
private static String usePreConfiguredOtp;
private static String preconfiguredOtp;
private static String eSignetbaseurl;

private static String dbPort;
private static String dbDomain;
private static String hibernateConnectionDriverClass;
Expand Down Expand Up @@ -247,7 +251,7 @@ public static void init() {
partner_client_secret = getValueForKey(MOSIP_PARTNER_CLIENT_SECRET);
pms_client_id = getValueForKey(MOSIP_PMS_CLIENT_ID);
partner_client_id = getValueForKey(MOSIP_PARTNER_CLIENT_ID);

pms_app_id = getValueForKey(MOSIP_PMS_APP_ID);
resident_client_secret = getValueForKey(MOSIP_RESIDENT_CLIENT_SECRET);
resident_client_id = getValueForKey(MOSIP_RESIDENT_CLIENT_ID);
Expand All @@ -260,15 +264,15 @@ public static void init() {
admin_client_secret = getValueForKey(MOSIP_ADMIN_CLIENT_SECRET);
admin_client_id = getValueForKey(MOSIP_ADMIN_CLIENT_ID);
admin_app_id = getValueForKey(MOSIP_ADMIN_APP_ID);

regproc_client_secret = getValueForKey(MOSIP_REG_CLIENT_SECRET);
regproc_client_id = getValueForKey(MOSIP_REG_CLIENT_ID);
regproc_app_id = getValueForKey(MOSIP_REGCLIENT_APP_ID);

regprocessor_client_secret = getValueForKey(MOSIP_REGPROC_CLIENT_SECRET);
regprocessor_client_id = getValueForKey(MOSIP_REGPROC_CLIENT_ID);
regprocessor_app_id = getValueForKey(MOSIP_REGPROC_APP_ID);

ida_client_secret = getValueForKey(MOSIP_IDA_CLIENT_SECRET);
ida_client_id = getValueForKey(MOSIP_IDA_CLIENT_ID);
ida_app_id = getValueForKey(MOSIP_IDA_APP_ID);
Expand Down Expand Up @@ -374,12 +378,17 @@ public static void init() {
: System.getenv(PRECONFIGOTP);
propsKernel.setProperty(PRECONFIGOTP, preconfiguredOtp);

useExternalScenario_sheet = System.getenv(USE_EXTERNAL_SCENARIO_SHEET) == null
? propsKernel.getProperty(USE_EXTERNAL_SCENARIO_SHEET)
: System.getenv(USE_EXTERNAL_SCENARIO_SHEET);
propsKernel.setProperty(USE_EXTERNAL_SCENARIO_SHEET, useExternalScenario_sheet);

esignet_deployed = System.getenv(ESIGNET_DEPLOYED) == null ? propsKernel.getProperty(ESIGNET_DEPLOYED)
: System.getenv(ESIGNET_DEPLOYED);
propsKernel.setProperty(ESIGNET_DEPLOYED, esignet_deployed);

if (System.getenv(ESIGNET_BASE_URL) != null) {
eSignetbaseurl =System.getenv(ESIGNET_BASE_URL);
eSignetbaseurl = System.getenv(ESIGNET_BASE_URL);
} else {
eSignetbaseurl = System.getProperty("env.endpoint").replace("-internal", "");
}
Expand All @@ -389,13 +398,17 @@ public static void init() {
? propsKernel.getProperty(SCENARIOS_TO_BE_SKIPPED)
: System.getenv(SCENARIOS_TO_BE_SKIPPED);
propsKernel.setProperty(SCENARIOS_TO_BE_SKIPPED, toSkippedList);


toExecuteList = System.getenv(SCENARIOS_TO_BE_EXECUTED) == null
? propsKernel.getProperty(SCENARIOS_TO_BE_EXECUTED)
: System.getenv(SCENARIOS_TO_BE_EXECUTED);
propsKernel.setProperty(SCENARIOS_TO_BE_EXECUTED, toExecuteList);

partnerUrlSuffix = System.getenv(PARTNER_URL_SUFFIX) == null ? propsKernel.getProperty(PARTNER_URL_SUFFIX)
: System.getenv(PARTNER_URL_SUFFIX);
propsKernel.setProperty(PARTNER_URL_SUFFIX, partnerUrlSuffix);

userAdminName = System.getenv(ADMIN_USER_NAME) == null
? propsKernel.getProperty(ADMIN_USER_NAME)

userAdminName = System.getenv(ADMIN_USER_NAME) == null ? propsKernel.getProperty(ADMIN_USER_NAME)
: System.getenv(ADMIN_USER_NAME);
propsKernel.setProperty(ADMIN_USER_NAME, userAdminName);
}
Expand All @@ -404,28 +417,51 @@ public static boolean isInTobeSkippedList(String stringToFind) {
synchronized (toSkippedList) {
List<String> toBeSkippedLsit = Arrays.asList(toSkippedList.split(","));
if (ConfigManager.IsDebugEnabled())
LOGGER.info("toSkippedList: " + toSkippedList + ", toBeSkippedLsit : "+ toBeSkippedLsit + ", stringToFind : "+ stringToFind );
LOGGER.info("toSkippedList: " + toSkippedList + ", toBeSkippedLsit : " + toBeSkippedLsit
+ ", stringToFind : " + stringToFind);
for (String string : toBeSkippedLsit) {
if (string.equalsIgnoreCase(stringToFind))
return true;
}
}
return false;
}


public static boolean isInTobeExecuteList(String stringToFind) {
synchronized (toExecuteList) {
// If there are no specific execution list is provided , execute all scenarios
if (toExecuteList != null && toExecuteList.isEmpty())
return true;

List<String> toBeExecuteList = Arrays.asList(toExecuteList.split(","));
if (ConfigManager.IsDebugEnabled())
LOGGER.info("toExecuteList: " + toExecuteList + ", toBeExecuteList : " + toBeExecuteList
+ ", stringToFind : " + stringToFind);
for (String string : toBeExecuteList) {
if (string.trim().equalsIgnoreCase(stringToFind))
return true;
}
}
return false;
}

public static String getUserAdminName() {
return userAdminName;

}

public static String getPartnerUrlSuffix() {
return partnerUrlSuffix;
}

public static Boolean IseSignetDeployed() {
return esignet_deployed.equalsIgnoreCase("yes");
}


public static Boolean useExternalScenarioSheet() {
return useExternalScenario_sheet.equalsIgnoreCase("yes");
}

public static Boolean IsDebugEnabled() {
return enableDebug.equalsIgnoreCase("yes");
}
Expand All @@ -447,11 +483,12 @@ public static int getLangselect() {
return Integer.parseInt(langselect);

}

public static String getEsignetBaseUrl() {
return eSignetbaseurl;

}

public static String getUsePreConfiguredOtp() {
return usePreConfiguredOtp;

Expand Down Expand Up @@ -497,17 +534,15 @@ public static Properties init(String abc) {
public static String getPmsClientSecret() {
return pms_client_secret;
}



public static String getPartnerClientSecret() {
return partner_client_secret;
}

public static String getPmsClientId() {
return pms_client_id;
}



public static String getPartnerClientId() {
return partner_client_id;
}
Expand Down Expand Up @@ -571,9 +606,9 @@ public static String getRegprocClientId() {
public static String getRegprocAppId() {
return regproc_app_id;
}

public static String getRegprocessorClientSecret() {
return regprocessor_client_secret;
return regprocessor_client_secret;
}

public static String getRegprocessorClientId() {
Expand Down
6 changes: 6 additions & 0 deletions automationtests/src/main/resources/config/Kernel.properties
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,11 @@ eSignetDeployed=yes
# supported values "S-scnearioNumber" for server side and "A-scnearioNumber" for automation
scenariosToSkip=

#-- Add scenarios to include in the the execution list------
# -- Empty if we want to execute all the scenarios---
scenariosToExecute=

#-- supported values yes or no
useExternalScenarioSheet=yes

partnerUrlSuffix=oYf63Lax0DY2QkYMRHnrmDqhmO3RMWQagwm0ftgLlkuin1KOND/666/576732
Loading

0 comments on commit 6ad5a5e

Please sign in to comment.