Skip to content

Commit

Permalink
Merge pull request mosip#1484 from nandhu-kumar/release-1.3.0-ES
Browse files Browse the repository at this point in the history
ES-1319
  • Loading branch information
lsivanand authored Jun 17, 2024
2 parents 95aae6c + defad96 commit 10b8b0a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public class ConfigManager {

private static String USEPRECONFIGOTP = "usePreConfiguredOtp";
private static String ESIGNET_BASE_URL = "eSignetbaseurl";

private static String SIGNUP_BASE_URL = "signupBaseUrl";

private static String ESIGNET_MOCK_BASE_URL = "esignetMockBaseURL";

Expand Down Expand Up @@ -197,6 +199,7 @@ public class ConfigManager {
private static String usePreConfiguredOtp;
private static String preconfiguredOtp;
private static String eSignetbaseurl;
private static String signupBaseUrl;
private static String esignetMockBaseURL;

private static String dbPort;
Expand Down Expand Up @@ -406,7 +409,14 @@ public static void init() {
eSignetbaseurl = System.getProperty("env.endpoint").replace("-internal", "");
}
propsKernel.setProperty(ESIGNET_BASE_URL, eSignetbaseurl);


if (System.getenv(SIGNUP_BASE_URL) != null) {
signupBaseUrl = System.getenv(SIGNUP_BASE_URL);
} else {
signupBaseUrl = System.getProperty("env.endpoint");
}
propsKernel.setProperty(SIGNUP_BASE_URL, signupBaseUrl);

esignetMockBaseURL = System.getenv(ESIGNET_MOCK_BASE_URL) == null
? propsKernel.getProperty(ESIGNET_MOCK_BASE_URL)
: System.getenv(ESIGNET_MOCK_BASE_URL);
Expand Down Expand Up @@ -530,6 +540,11 @@ public static String getEsignetBaseUrl() {
return eSignetbaseurl;

}

public static String getSignupBaseUrl() {
return signupBaseUrl;

}

public static String getEsignetMockBaseURL() {
return esignetMockBaseURL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
if (testCaseName.contains("ESignet_")) {
String tempUrl = ConfigManager.getEsignetBaseUrl();
if (testCaseDTO.getEndPoint().contains("/signup/"))
tempUrl = ApplnURI;
tempUrl = ConfigManager.getSignupBaseUrl();

response = getWithPathParamAndCookie(tempUrl + testCaseDTO.getEndPoint(),
getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate()), COOKIENAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void test(TestCaseDTO testCaseDTO)
String tempUrl = ConfigManager.getEsignetBaseUrl();

if (testCaseDTO.getEndPoint().contains("/signup/"))
tempUrl = ApplnURI;
tempUrl = ConfigManager.getSignupBaseUrl();
otpResponse = postRequestWithCookieAuthHeaderAndXsrfToken(tempUrl + sendOtpEndPoint,
getJsonFromTemplate(otpReqJson.toString(), sendOtpReqTemplate), COOKIENAME,
testCaseDTO.getTestCaseName());
Expand Down Expand Up @@ -217,7 +217,7 @@ public void test(TestCaseDTO testCaseDTO)
String tempUrl = ConfigManager.getEsignetBaseUrl();

if (testCaseDTO.getEndPoint().contains("/signup/"))
tempUrl = ApplnURI;
tempUrl = ConfigManager.getSignupBaseUrl();
if (testCaseName.startsWith("ESignet_VerifyChallengeNegTC_")
|| testCaseName.startsWith("ESignet_VerifyChallengeForResetPasswordNegTC_")) {
response = postRequestWithCookieAuthHeaderAndXsrfToken(tempUrl + testCaseDTO.getEndPoint(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
String tempUrl = ConfigManager.getEsignetBaseUrl();

if (testCaseDTO.getEndPoint().contains("/signup/"))
tempUrl = ApplnURI;
tempUrl = ConfigManager.getSignupBaseUrl();
if (testCaseName.contains("ESignet_")) {
if (testCaseDTO.getEndPoint().startsWith("$ESIGNETMOCKBASEURL$")
&& testCaseName.contains("SunBirdRC")) {
Expand Down

0 comments on commit 10b8b0a

Please sign in to comment.