diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java b/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java index 6ef14a1c65..a5f768fc72 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java @@ -30,6 +30,7 @@ import io.mosip.testrig.apirig.utils.EncryptionDecrptionUtil; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.GlobalMethods; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.JWKKeyUtil; import io.mosip.testrig.apirig.utils.KeyCloakUserAndAPIKeyGeneration; import io.mosip.testrig.apirig.utils.KeycloakUserManager; @@ -65,14 +66,16 @@ public static void main(String[] arg) { for (String envName : envMap.keySet()) { LOGGER.info(String.format("ENV %s = %s%n", envName, envMap.get(envName))); } + BaseTestCase.setRunContext(getRunType(), jarUrl); ExtractResource.removeOldMosipTestTestResource(); - if (checkRunType().equalsIgnoreCase("JAR")) { + if (getRunType().equalsIgnoreCase("JAR")) { ExtractResource.extractCommonResourceFromJar(); } else { ExtractResource.copyCommonResources(); } - ConfigManager.init(); - BaseTestCase.suiteSetup(); + IdAuthConfigManager.init(); + + BaseTestCase.suiteSetup(getRunType()); SkipTestCaseHandler.loadTestcaseToBeSkippedList("testCaseSkippedList.txt"); setLogLevels(); @@ -114,7 +117,7 @@ public static void main(String[] arg) { LOGGER.error("Exception " + e.getMessage()); } - MockSMTPListener.bTerminate = true; + OTPListener.bTerminate = true; if (BaseTestCase.isTargetEnvLTS()) HealthChecker.bTerminate = true; @@ -145,7 +148,7 @@ public static void startTestRunner() { List modulesToRun = BaseTestCase.listOfModules; String os = System.getProperty("os.name"); LOGGER.info(os); - if (checkRunType().contains("IDE") || os.toLowerCase().contains("windows")) { + if (getRunType().contains("IDE") || os.toLowerCase().contains("windows")) { homeDir = new File(System.getProperty("user.dir") + "/testNgXmlFiles"); LOGGER.info("IDE :" + homeDir); } else { @@ -176,10 +179,10 @@ public static void startTestRunner() { */ /* * public static String getGlobalResourcePath() { if - * (checkRunType().equalsIgnoreCase("JAR")) { return new + * (getRunType().equalsIgnoreCase("JAR")) { return new * File(jarUrl).getParentFile().getAbsolutePath() + * "/MosipTestResource/MosipTemporaryTestResource"; } else if - * (checkRunType().equalsIgnoreCase("IDE")) { String path = new + * (getRunType().equalsIgnoreCase("IDE")) { String path = new * File(MosipTestRunner.class.getClassLoader().getResource("").getPath()). * getAbsolutePath() + "/MosipTestResource/MosipTemporaryTestResource"; if * (path.contains(GlobalConstants.TESTCLASSES)) path = @@ -193,9 +196,9 @@ public static String getGlobalResourcePath() { } String path = null; - if (checkRunType().equalsIgnoreCase("JAR")) { + if (getRunType().equalsIgnoreCase("JAR")) { path = new File(jarUrl).getParentFile().getAbsolutePath() + "/MosipTestResource/MosipTemporaryTestResource"; - } else if (checkRunType().equalsIgnoreCase("IDE")) { + } else if (getRunType().equalsIgnoreCase("IDE")) { path = new File(MosipTestRunner.class.getClassLoader().getResource("").getPath()).getAbsolutePath() + "/MosipTestResource/MosipTemporaryTestResource"; if (path.contains(GlobalConstants.TESTCLASSES)) @@ -212,9 +215,9 @@ public static String getGlobalResourcePath() { public static String getResourcePath() { return getGlobalResourcePath(); -// if (checkRunType().equalsIgnoreCase("JAR")) { +// if (getRunType().equalsIgnoreCase("JAR")) { // return new File(jarUrl).getParentFile().getAbsolutePath(); -// } else if (checkRunType().equalsIgnoreCase("IDE")) { +// } else if (getRunType().equalsIgnoreCase("IDE")) { // String path = new File(MosipTestRunner.class.getClassLoader().getResource("").getPath()).getAbsolutePath(); // if (path.contains(GlobalConstants.TESTCLASSES)) // path = path.replace(GlobalConstants.TESTCLASSES, "classes"); @@ -314,7 +317,7 @@ public static Properties getproperty(String path) { * * @return */ - public static String checkRunType() { + public static String getRunType() { if (MosipTestRunner.class.getResource("MosipTestRunner.class").getPath().contains(".jar")) return "JAR"; else diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java index 932efb73d7..ed7388d135 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java @@ -36,6 +36,7 @@ import io.mosip.testrig.apirig.utils.AuthenticationTestException; import io.mosip.testrig.apirig.utils.ConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.KernelAuthentication; import io.mosip.testrig.apirig.utils.KeycloakUserManager; @@ -125,8 +126,8 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad String picture = properties.getProperty("picturevalue"); list.add(picture); attrmap.put("picture", list); - KeycloakUserManager.createVidUsers(propsKernel.getProperty("new_Resident_User"), - propsKernel.getProperty("new_Resident_Password"), propsKernel.getProperty("new_Resident_Role"), + KeycloakUserManager.createVidUsers(IdAuthConfigManager.getproperty("new_Resident_User"), + IdAuthConfigManager.getproperty("new_Resident_Password"), IdAuthConfigManager.getproperty("new_Resident_Role"), attrmap); } @@ -137,7 +138,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad inputJson = inputJson.replace("$UIN$", uin); inputJson = inputJson.replace("$RID$", genRid); String phoneNumber = ""; - String email = testCaseName + "@mosip.net"; + String email = testCaseName +"@mosip.net"; if (inputJson.contains("$PHONENUMBERFORIDENTITY$")) { if (!phoneSchemaRegex.isEmpty()) try { @@ -147,7 +148,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad } inputJson = replaceKeywordWithValue(inputJson, "$PHONENUMBERFORIDENTITY$", phoneNumber); inputJson = replaceKeywordWithValue(inputJson, "$EMAILVALUE$", email); - + } response = postWithBodyAndCookie(ApplnURI + testCaseDTO.getEndPoint(), inputJson, COOKIENAME, diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java index 70bedb3ee3..2b4f12f0c8 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java @@ -26,7 +26,7 @@ import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; import io.mosip.testrig.apirig.utils.BioDataUtility; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.EncryptionDecrptionUtil; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -47,7 +47,7 @@ public class BioAuth extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -159,206 +159,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad throw new AdminTestException("Failed at output validation"); - /* - * if (testCaseName.toLowerCase().contains("kyc")) { String error = null; if - * (response.getBody().asString().contains("errors")) error = - * JsonPrecondtion.getJsonValueFromJson(response.getBody().asString(), - * "errors"); if (error.equalsIgnoreCase("null")) - * encryptDecryptUtil.validateThumbPrintAndIdentity(response, - * testCaseDTO.getEndPoint()); } - */ - - /* - * if - * (!encryptDecryptUtil.verifyResponseUsingDigitalSignature(response.asString(), - * response.getHeader(props.getProperty("signatureheaderKey")))) throw new - * AdminTestException("Failed at Signature validation"); - */ } - - -// /** -// * Test method for OTP Generation execution -// * -// * @param objTestParameters -// * @param testScenario -// * @param testcaseName -// * @throws AuthenticationTestException -// * @throws AdminTestException -// */ -// @Test(dataProvider = "testcaselist") -// public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { -// testCaseName = testCaseDTO.getTestCaseName(); -// String[] kycFields = testCaseDTO.getKycFields(); -// -// if (HealthChecker.signalTerminateExecution) { -// throw new SkipException( -// GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); -// } -// -// testCaseName = isTestCaseValidForExecution(testCaseDTO); -// -// if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { -// if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") -// && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { -// throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); -// } -// } -// -// if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { -// if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") -// && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { -// throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); -// } -// } -// -// if (testCaseDTO.getEndPoint().contains("$PartnerKeyURL$")) { -// testCaseDTO.setEndPoint( -// testCaseDTO.getEndPoint().replace("$PartnerKeyURL$", PartnerRegistration.partnerKeyUrl)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$KycPartnerKeyURL$")) { -// testCaseDTO.setEndPoint( -// testCaseDTO.getEndPoint().replace("$KycPartnerKeyURL$", PartnerRegistration.ekycPartnerKeyUrl)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$UpdatedPartnerKeyURL$")) { -// testCaseDTO.setEndPoint(testCaseDTO.getEndPoint().replace("$UpdatedPartnerKeyURL$", -// PartnerRegistration.updatedpartnerKeyUrl)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$PartnerName$")) { -// testCaseDTO.setEndPoint(testCaseDTO.getEndPoint().replace("$PartnerName$", PartnerRegistration.partnerId)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$KycPartnerName$")) { -// testCaseDTO.setEndPoint( -// testCaseDTO.getEndPoint().replace("$KycPartnerName$", PartnerRegistration.ekycPartnerId)); -// } -// String request = testCaseDTO.getInput(); -// request = buildIdentityRequest(request); -// -// String inputJSON = getJsonFromTemplate(request, testCaseDTO.getInputTemplate()); -// String resolvedUri = null; -// String individualId = null; -// resolvedUri = uriKeyWordHandelerUri(testCaseDTO.getEndPoint(), testCaseName); -// -// individualId = AdminTestUtil.getValueFromUrl(resolvedUri, "id"); -// -// String url = ConfigManager.getAuthDemoServiceUrl(); -// -// response = postWithBodyAndCookie(url + testCaseDTO.getEndPoint(), inputJSON, COOKIENAME, testCaseDTO.getRole(), -// testCaseDTO.getTestCaseName()); -// -// String ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// -// if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { -// if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") -// || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { -// ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// } else { -// if (testCaseDTO.getTestCaseName().contains("auth_EkycBio")) { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUINKyc.json").toString(); -// } else { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); -// } -// -// } -// } else { -// if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { -// if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") -// || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { -// ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// } else { -// if (testCaseDTO.getTestCaseName().contains("auth_EkycBio")) { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUINKyc.json").toString(); -// } else { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); -// } -// -// } -// } -// } -// -// Map> ouputValid = OutputValidationUtil -// .doJsonOutputValidation(response.asString(), ActualOPJson, testCaseDTO, response.getStatusCode()); -// Reporter.log(ReportUtil.getOutputValidationReport(ouputValid)); -// -// if (!OutputValidationUtil.publishOutputResult(ouputValid)) -// throw new AdminTestException("Failed at output validation"); -// -// if (testCaseName.toLowerCase().contains("kyc")) { -// JSONObject resJsonObject = new JSONObject(response.asString()); -// String res = ""; -// try { -// // res = resJsonObject.get("response").toString(); -// resJsonObject = new JSONObject(response.getBody().asString()).getJSONObject("authResponse") -// .getJSONObject("body").getJSONObject("response"); -// -// res = AdminTestUtil.ekycDataDecryption(url, resJsonObject, PartnerRegistration.ekycPartnerId, true); -// -// JSONObject jsonObjectkycRes = new JSONObject(res); -// JSONObject jsonObjectFromKycData = new JSONObject(); -// JSONObject jsonObjectFromIdentityData = new JSONObject(); -// // List myList =new ArrayList<>(); -// -// ArrayList names = new ArrayList<>(); -// ArrayList names2 = new ArrayList<>(); -// -// for (int i = 0; i < kycFields.length; i++) { -// for (String key : jsonObjectkycRes.keySet()) { -// if (key.contains(kycFields[i])) { -// names.add(key);// dob gender_eng -// names2.add(kycFields[i]);// dob gender -// jsonObjectFromKycData.append(key, jsonObjectkycRes.getString(key)); -// break; -// } -// } -// -// } -// -// newResponse = RestClient.getRequestWithCookie( -// ApplnURI + props.getProperty("retrieveIdByUin") + individualId, MediaType.APPLICATION_JSON, -// MediaType.APPLICATION_JSON, COOKIENAME, kernelAuthLib.getTokenByRole("idrepo"), -// IDTOKENCOOKIENAME, null); -// -// GlobalMethods.reportResponse(newResponse.getHeaders().asList().toString(), url, newResponse); -// -// JSONObject responseBody = new JSONObject(newResponse.getBody().asString()).getJSONObject("response") -// .getJSONObject("identity"); -// -// for (int j = 0; j < names2.size(); j++) { -// -// String mappingField = getValueFromAuthActuator("json-property", names2.get(j)); -// mappingField = mappingField.replaceAll("\\[\"|\"\\]", ""); -// JSONArray valueOfJsonArray = responseBody.optJSONArray(mappingField); -// if (valueOfJsonArray != null) { -// jsonObjectFromIdentityData.append(names.get(j), valueOfJsonArray.getJSONObject(0).get("value")); -// -// valueOfJsonArray = null; -// } else { -// jsonObjectFromIdentityData.append(names.get(j), responseBody.getString(mappingField)); -// } -// -// } -// -// ouputValid = OutputValidationUtil.doJsonOutputValidation(jsonObjectFromIdentityData.toString(), -// jsonObjectFromKycData.toString(), testCaseDTO, response.getStatusCode()); -// Reporter.log(ReportUtil.getOutputValidationReport(ouputValid)); -// -// if (!OutputValidationUtil.publishOutputResult(ouputValid)) -// throw new AdminTestException("Failed at output validation"); -// -// } catch (JSONException e) { -// logger.error(e.getMessage()); -// } -// -// } -// } - /** * The method ser current test name to result * diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java index e821dcb515..4e152f59a3 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java @@ -28,7 +28,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.EncryptionDecrptionUtil; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -46,7 +46,7 @@ public class DemoAuth extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java index 94fa931d34..28a7c509f2 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java @@ -33,7 +33,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.GlobalMethods; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; @@ -53,7 +53,7 @@ public class DemoAuthSimplePostForAutoGenId extends AdminTestUtil implements ITe @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -201,9 +201,9 @@ public void test(TestCaseDTO testCaseDTO) } else { if (testCaseName.contains("partnerDemoDown")) { - //url = ConfigManager.getAuthDemoServiceUrl() + "local"; + //url = IdAuthConfigManager.getAuthDemoServiceUrl() + "local"; } else { - //url = ConfigManager.getAuthDemoServiceUrl(); + //url = IdAuthConfigManager.getAuthDemoServiceUrl(); } response = postWithBodyAndCookie(url + testCaseDTO.getEndPoint(), inputJson, COOKIENAME, diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java index 7299313e6f..ed10deaf04 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java @@ -27,7 +27,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -42,7 +42,7 @@ public class GetWithParam extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java index b53f004fc2..1a5de33bbf 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java @@ -27,7 +27,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -43,7 +43,7 @@ public class GetWithParamForAutoGenId extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java index de7d9d25fd..d31b1966e7 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java @@ -28,7 +28,7 @@ import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; import io.mosip.testrig.apirig.utils.BioDataUtility; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.EncryptionDecrptionUtil; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -46,7 +46,7 @@ public class MultiFactorAuthNew extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -214,175 +214,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad if (!OutputValidationUtil.publishOutputResult(ouputValid)) throw new AdminTestException("Failed at output validation"); - /* - * if(testCaseName.toLowerCase().contains("kyc")) - * encryptDecryptUtil.validateThumbPrintAndIdentity(response, - * testCaseDTO.getEndPoint()); - */ - - //if(!encryptDecryptUtil.verifyResponseUsingDigitalSignature(response.asString(), response.getHeader(props.getProperty("signatureheaderKey")))) - //throw new AdminTestException("Failed at Signature validation"); } - /** - * Test method for OTP Generation execution - * - * @param objTestParameters - * @param testScenario - * @param testcaseName - * @throws AuthenticationTestException - * @throws AdminTestException - */ -// @Test(dataProvider = "testcaselist") -// public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { -// testCaseName = testCaseDTO.getTestCaseName(); -// -// if (HealthChecker.signalTerminateExecution) { -// throw new SkipException( -// GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); -// } -// -// testCaseName = isTestCaseValidForExecution(testCaseDTO); -// -// if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { -// if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") -// && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { -// throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); -// } -// } -// -// if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { -// if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") -// && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { -// throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); -// } -// } -// -// JSONObject input = new JSONObject(testCaseDTO.getInput()); -// String individualId = null; -// if (input.has(GlobalConstants.INDIVIDUALID)) { -// individualId = input.get(GlobalConstants.INDIVIDUALID).toString(); -// input.remove(GlobalConstants.INDIVIDUALID); -// } -// -// individualId = uriKeyWordHandelerUri(individualId, testCaseName); -// -// String url = ConfigManager.getAuthDemoServiceUrl(); -// -// HashMap requestBody = new HashMap<>(); -// -// requestBody.put("id", individualId); -// requestBody.put("keyFileNameByPartnerName", GlobalConstants.TRUE_STRING); -// requestBody.put("partnerName", PartnerRegistration.partnerId); -// requestBody.put("moduleName", BaseTestCase.certsForModule); -// requestBody.put(GlobalConstants.TRANSACTIONID, "$TRANSACTIONID$"); -// -// String token = kernelAuthLib.getTokenByRole(GlobalConstants.RESIDENT); -// -// if (input.has("otp") && !input.get("otp").toString().equalsIgnoreCase("otp")) { -// -// Response sendOtpReqResp = postWithOnlyQueryParamAndCookie(url + "/v1/identity/createOtpReqest", -// requestBody.toString(), GlobalConstants.AUTHORIZATION, GlobalConstants.RESIDENT, testCaseName); -// -// String otpInput = sendOtpReqResp.getBody().asString(); -// logger.info(otpInput); -// String signature = sendOtpReqResp.getHeader("signature"); -// Object sendOtpBody = otpInput; -// logger.info(sendOtpBody); -// -// HashMap headers = new HashMap<>(); -// headers.put(AUTHORIZATHION_HEADERNAME, token); -// headers.put(SIGNATURE_HEADERNAME, signature); -// -// Response otpRespon = null; -// -// otpRespon = postRequestWithAuthHeaderAndSignatureForOtp( -// ApplnURI + "/idauthentication/v1/otp/" + PartnerRegistration.partnerKeyUrl, sendOtpBody.toString(), -// GlobalConstants.AUTHORIZATION, token, headers, testCaseName); -// -// JSONObject res = new JSONObject(testCaseDTO.getOutput()); -// String sendOtpResp = null; -// String sendOtpResTemplate = null; -// if (res.has(GlobalConstants.SENDOTPRESP)) { -// sendOtpResp = res.get(GlobalConstants.SENDOTPRESP).toString(); -// res.remove(GlobalConstants.SENDOTPRESP); -// } -// JSONObject sendOtpRespJson = new JSONObject(sendOtpResp); -// sendOtpResTemplate = sendOtpRespJson.getString("sendOtpResTemplate"); -// sendOtpRespJson.remove("sendOtpResTemplate"); -// Map> ouputValidOtp = OutputValidationUtil.doJsonOutputValidation( -// otpRespon.asString(), getJsonFromTemplate(sendOtpRespJson.toString(), sendOtpResTemplate), -// testCaseDTO, otpRespon.getStatusCode()); -// Reporter.log(ReportUtil.getOutputValidationReport(ouputValidOtp)); -// -// if (!OutputValidationUtil.publishOutputResult(ouputValidOtp)) -// throw new AdminTestException("Failed at Send OTP output validation"); -// -// if (testCaseDTO.getTestCaseName().contains("expiredOTP")) { -// try { -// Thread.sleep(Long.parseLong(properties.getProperty("expireOtpTime"))); -// } catch (NumberFormatException e) { -// logger.error("Exception : " + e.getMessage()); -// } catch (InterruptedException e) { -// logger.error("Exception : " + e.getMessage()); -// } -// } -// -// } -// -// String endPoint = testCaseDTO.getEndPoint(); -// endPoint = uriKeyWordHandelerUri(endPoint, testCaseName); -// -// if (endPoint.contains("$partnerKeyURL$")) { -// endPoint = endPoint.replace("$partnerKeyURL$", PartnerRegistration.partnerKeyUrl); -// } -// if (endPoint.contains("$PartnerName$")) { -// endPoint = endPoint.replace("$PartnerName$", PartnerRegistration.partnerId); -// } -// -// if (endPoint.contains("$UpdatedPartnerKeyURL$")) { -// endPoint = endPoint.replace("$UpdatedPartnerKeyURL$", PartnerRegistration.updatedpartnerKeyUrl); -// } -// -// String inputStr = buildIdentityRequest(input.toString()); -// -// String authRequest = getJsonFromTemplate(inputStr, testCaseDTO.getInputTemplate()); -// logger.info("******Post request Json to EndPointUrl: " + url + endPoint + " *******"); -// -// response = postWithBodyAndCookie(url + endPoint, authRequest, COOKIENAME, testCaseDTO.getRole(), testCaseName); -// -// logger.info(response); -// String ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// -// if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { -// if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") -// || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { -// ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// } else { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); -// } -// } else { -// if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { -// if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") -// || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { -// ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// } else { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); -// } -// } -// } -// -// Map> ouputValid = OutputValidationUtil -// .doJsonOutputValidation(response.asString(), ActualOPJson, testCaseDTO, response.getStatusCode()); -// Reporter.log(ReportUtil.getOutputValidationReport(ouputValid)); -// -// if (!OutputValidationUtil.publishOutputResult(ouputValid)) -// throw new AdminTestException("Failed at output validation"); -// -// } - /** * The method ser current test name to result * diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java index 3b3c0424a3..433cdd6d8a 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java @@ -26,7 +26,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.EncryptionDecrptionUtil; import io.mosip.testrig.apirig.utils.FileUtil; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; @@ -46,7 +46,7 @@ public class OtpAuthNew extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -182,216 +182,9 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad if (!OutputValidationUtil.publishOutputResult(ouputValid)) throw new AdminTestException("Failed at output validation"); - /* - * if(testCaseName.toLowerCase().contains("kyc")) { String error = null; - * if(response.getBody().asString().contains("errors")) error = - * JsonPrecondtion.getJsonValueFromJson(response.getBody().asString(),"errors"); - * if(error.equalsIgnoreCase("null")) - * encryptDecryptUtil.validateThumbPrintAndIdentity(response, - * testCaseDTO.getEndPoint()); } - */ - - //if(!encryptDecryptUtil.verifyResponseUsingDigitalSignature(response.asString(), response.getHeader(props.getProperty("signatureheaderKey")))) - //throw new AdminTestException("Failed at Signature validation"); } - /** - * Test method for OTP Generation execution - * - * @param objTestParameters - * @param testScenario - * @param testcaseName - * @throws AuthenticationTestException - * @throws AdminTestException - */ -// @Test(dataProvider = "testcaselist") -// public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { -// testCaseName = testCaseDTO.getTestCaseName(); -// -// if (HealthChecker.signalTerminateExecution) { -// throw new SkipException( -// GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); -// } -// -// if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { -// if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") -// && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { -// throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); -// } -// } -// -// if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { -// if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") -// && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { -// throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); -// } -// } -// -// testCaseName = isTestCaseValidForExecution(testCaseDTO); -// -// if (testCaseDTO.getEndPoint().contains("$PartnerKeyURL$")) { -// testCaseDTO.setEndPoint( -// testCaseDTO.getEndPoint().replace("$PartnerKeyURL$", PartnerRegistration.partnerKeyUrl)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$KycPartnerKeyURL$")) { -// testCaseDTO.setEndPoint( -// testCaseDTO.getEndPoint().replace("$KycPartnerKeyURL$", PartnerRegistration.ekycPartnerKeyUrl)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$UpdatedPartnerKeyURL$")) { -// testCaseDTO.setEndPoint(testCaseDTO.getEndPoint().replace("$UpdatedPartnerKeyURL$", -// PartnerRegistration.updatedpartnerKeyUrl)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$PartnerName$")) { -// testCaseDTO.setEndPoint(testCaseDTO.getEndPoint().replace("$PartnerName$", PartnerRegistration.partnerId)); -// } -// -// if (testCaseDTO.getEndPoint().contains("$KycPartnerName$")) { -// testCaseDTO.setEndPoint( -// testCaseDTO.getEndPoint().replace("$KycPartnerName$", PartnerRegistration.ekycPartnerId)); -// } -// -// JSONObject input = new JSONObject(testCaseDTO.getInput()); -// String individualId = null; -// if (input.has(GlobalConstants.INDIVIDUALID)) { -// individualId = input.get(GlobalConstants.INDIVIDUALID).toString(); -// input.remove(GlobalConstants.INDIVIDUALID); -// } -// -// individualId = uriKeyWordHandelerUri(individualId, testCaseName); -// -// String url = ConfigManager.getAuthDemoServiceUrl(); -// -// HashMap requestBody = new HashMap<>(); -// -// requestBody.put("id", individualId); -// requestBody.put("keyFileNameByPartnerName", GlobalConstants.TRUE_STRING); -// requestBody.put("partnerName", PartnerRegistration.partnerId); -// requestBody.put("moduleName", BaseTestCase.certsForModule); -// requestBody.put(GlobalConstants.TRANSACTIONID, "$TRANSACTIONID$"); -// -// String token = kernelAuthLib.getTokenByRole(GlobalConstants.RESIDENT); -// -// Response sendOtpReqResp = postWithOnlyQueryParamAndCookie(url + "/v1/identity/createOtpReqest", -// requestBody.toString(), GlobalConstants.AUTHORIZATION, GlobalConstants.RESIDENT, testCaseName); -// -// logger.info(sendOtpReqResp); -// -// String otpInput = sendOtpReqResp.getBody().asString(); -// logger.info(otpInput); -// String signature = sendOtpReqResp.getHeader("signature"); -// Object sendOtpBody = otpInput; -// logger.info(sendOtpBody); -// -// HashMap headers = new HashMap<>(); -// headers.put(AUTHORIZATHION_HEADERNAME, token); -// headers.put(SIGNATURE_HEADERNAME, signature); -// -// Response otpRespon = null; -// -// if (testCaseDTO.getTestCaseName().contains("EkycOtp")) { -// otpRespon = postRequestWithAuthHeaderAndSignatureForOtp( -// ApplnURI + "/idauthentication/v1/otp/" + PartnerRegistration.ekycPartnerKeyUrl, -// sendOtpBody.toString(), GlobalConstants.AUTHORIZATION, token, headers, testCaseName); -// } else { -// -// otpRespon = postRequestWithAuthHeaderAndSignatureForOtp( -// ApplnURI + "/idauthentication/v1/otp/" + PartnerRegistration.partnerKeyUrl, sendOtpBody.toString(), -// GlobalConstants.AUTHORIZATION, token, headers, testCaseName); -// -// } -// -// JSONObject res = new JSONObject(testCaseDTO.getOutput()); -// String sendOtpResp = null; -// String sendOtpResTemplate = null; -// if (res.has(GlobalConstants.SENDOTPRESP)) { -// sendOtpResp = res.get(GlobalConstants.SENDOTPRESP).toString(); -// res.remove(GlobalConstants.SENDOTPRESP); -// } -// JSONObject sendOtpRespJson = new JSONObject(sendOtpResp); -// sendOtpResTemplate = sendOtpRespJson.getString("sendOtpResTemplate"); -// sendOtpRespJson.remove("sendOtpResTemplate"); -// Map> ouputValidOtp = OutputValidationUtil.doJsonOutputValidation( -// otpRespon.asString(), getJsonFromTemplate(sendOtpRespJson.toString(), sendOtpResTemplate), testCaseDTO, -// otpRespon.getStatusCode()); -// Reporter.log(ReportUtil.getOutputValidationReport(ouputValidOtp)); -// -// if (!OutputValidationUtil.publishOutputResult(ouputValidOtp)) -// throw new AdminTestException("Failed at Send OTP output validation"); -// -// String endPoint = testCaseDTO.getEndPoint(); -// endPoint = uriKeyWordHandelerUri(endPoint, testCaseName); -// -// if (endPoint.contains("$partnerKeyURL$")) { -// endPoint = endPoint.replace("$partnerKeyURL$", PartnerRegistration.partnerKeyUrl); -// } -// if (endPoint.contains("$PartnerName$")) { -// endPoint = endPoint.replace("$PartnerName$", PartnerRegistration.partnerId); -// } -// -// String authRequest = ""; -// -// if (!(BaseTestCase.certsForModule.equals("DSL-IDA"))) { -// authRequest = getJsonFromTemplate(input.toString(), testCaseDTO.getInputTemplate()); -// } else { -// authRequest = input.toString(); -// } -// -// logger.info("******Post request Json to EndPointUrl: " + url + endPoint + " *******"); -// -// response = postWithBodyAndCookie(url + endPoint, authRequest, COOKIENAME, testCaseDTO.getRole(), testCaseName); -// -// String ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// -// if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { -// if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") -// || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { -// ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// } else { -// if (testCaseDTO.getTestCaseName().contains("auth_EkycOtp")) { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUINKyc.json").toString(); -// } else { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); -// } -// -// } -// } else { -// if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { -// if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") -// || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { -// ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); -// } else { -// if (testCaseDTO.getTestCaseName().contains("auth_EkycOtp")) { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUINKyc.json").toString(); -// } else { -// ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); -// } -// -// } -// } -// } -// Map> ouputValid = OutputValidationUtil -// .doJsonOutputValidation(response.asString(), ActualOPJson, testCaseDTO, response.getStatusCode()); -// Reporter.log(ReportUtil.getOutputValidationReport(ouputValid)); -// -// if (!OutputValidationUtil.publishOutputResult(ouputValid)) -// throw new AdminTestException("Failed at output validation"); -// -// if (testCaseName.toLowerCase().contains("kyc")) { -// JSONObject resJsonObject = new JSONObject(response.asString()); -// String resp = ""; -// try { -// resp = resJsonObject.get("response").toString(); -// } catch (JSONException e) { -// logger.error(e.getMessage()); -// } -// } -// -// } - /** * The method ser current test name to result * diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java index 2c4c35f2a5..c94921f56e 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java @@ -26,7 +26,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -39,7 +39,7 @@ public class PatchWithBodyWithOtpGenerate extends AdminTestUtil implements ITest @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java index 77eaf6373f..0533f4ebec 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java @@ -27,7 +27,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -43,7 +43,7 @@ public class PostWithAutogenIdWithOtpGenerate extends AdminTestUtil implements I @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -109,7 +109,7 @@ public void test(TestCaseDTO testCaseDTO) if (BaseTestCase.isTargetEnvLTS()) { - if (ConfigManager.isInServiceNotDeployedList(GlobalConstants.RESIDENT) + if (IdAuthConfigManager.isInServiceNotDeployedList(GlobalConstants.RESIDENT) && ((BaseTestCase.currentModule.equals("auth") || BaseTestCase.currentModule.equals("esignet")) && (testCaseName.startsWith("auth_GenerateVID_") || testCaseName.startsWith("ESignetRes_Generate")))) { diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java index 7623a6822e..4070f0a0fb 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java @@ -26,7 +26,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -41,7 +41,7 @@ public class PostWithBodyWithOtpGenerate extends AdminTestUtil implements ITest @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -93,7 +93,6 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = isTestCaseValidForExecution(testCaseDTO); auditLogCheck = testCaseDTO.isAuditLogCheck(); - String tempUrl = ConfigManager.getEsignetBaseUrl(); JSONObject req = new JSONObject(testCaseDTO.getInput()); String otpRequest = null; String sendOtpReqTemplate = null; diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java index 852a144a97..6fe7d3805e 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java @@ -27,7 +27,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -41,7 +41,7 @@ public class PostWithOnlyPathParam extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java index eb07777903..561d78778e 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java @@ -27,7 +27,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -42,7 +42,7 @@ public class SimplePost extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java index 0c3d59079b..c675565bf7 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java @@ -28,7 +28,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -44,7 +44,7 @@ public class SimplePostForAutoGenId extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -98,7 +98,7 @@ public void test(TestCaseDTO testCaseDTO) } if (BaseTestCase.isTargetEnvLTS()) { - if (!ConfigManager.isInServiceNotDeployedList(GlobalConstants.RESIDENT)) { + if (!IdAuthConfigManager.isInServiceNotDeployedList(GlobalConstants.RESIDENT)) { if (((BaseTestCase.currentModule.equals("auth") || BaseTestCase.currentModule.equals("esignet")) && (testCaseName.startsWith("auth_GenerateVID_") || testCaseName.startsWith("ESignetIdR_Generate")))) { diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java index d726078db3..d9cb10cebb 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java @@ -26,7 +26,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -41,7 +41,7 @@ public class UpdateDraft extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); @@ -92,46 +92,9 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); } } - String jsonInput = testCaseDTO.getInput(); - - if (BaseTestCase.languageList.size() == 2) { - jsonInput = jsonInput.replace(", { \"language\": \"$3RDLANG$\", \"value\": \"FR\" }", ""); - jsonInput = jsonInput.replace(", { \"language\": \"$3RDLANG$\", \"value\": \"Female\" }", ""); - jsonInput = jsonInput.replace(", { \"language\": \"$3RDLANG$\", \"value\": \"Mrs Lisa.GN\" }", ""); - jsonInput = jsonInput.replace(", { \"language\": \"$3RDLANG$\", \"value\": \"Line1\" }", ""); - jsonInput = jsonInput.replace(", { \"language\": \"$3RDLANG$\", \"value\": \"Line2\" }", ""); - jsonInput = jsonInput.replace(", { \"language\": \"$3RDLANG$\", \"value\": \"Line3\" }", ""); - } else if (BaseTestCase.languageList.size() == 1) { - jsonInput = jsonInput.replace( - ", { \"language\": \"$2NDLANG$\", \"value\": \"FR\" }, { \"language\": \"$3RDLANG$\", \"value\": \"FR\" }", - ""); - jsonInput = jsonInput.replace( - ", { \"language\": \"$2NDLANG$\", \"value\": \"Female\" }, { \"language\": \"$3RDLANG$\", \"value\": \"Female\" }", - ""); - jsonInput = jsonInput.replace( - ", { \"language\": \"$2NDLANG$\", \"value\": \"Mrs Lisa.GN\" }, { \"language\": \"$3RDLANG$\", \"value\": \"Mrs Lisa.GN\" }", - ""); - jsonInput = jsonInput.replace( - ", { \"language\": \"$2NDLANG$\", \"value\": \"Line1\" }, { \"language\": \"$3RDLANG$\", \"value\": \"Line1\" }", - ""); - jsonInput = jsonInput.replace( - ", { \"language\": \"$2NDLANG$\", \"value\": \"Line2\" }, { \"language\": \"$3RDLANG$\", \"value\": \"Line2\" }", - ""); - jsonInput = jsonInput.replace( - ", { \"language\": \"$2NDLANG$\", \"value\": \"Line3\" }, { \"language\": \"$3RDLANG$\", \"value\": \"Line3\" }", - ""); - } - String inputJson = getJsonFromTemplate(jsonInput, testCaseDTO.getInputTemplate(), false); - if (inputJson.contains("$1STLANG$")) - inputJson = inputJson.replace("$1STLANG$", BaseTestCase.languageList.get(0)); - if (inputJson.contains("$2NDLANG$")) - inputJson = inputJson.replace("$2NDLANG$", BaseTestCase.languageList.get(1)); - if (inputJson.contains("$3RDLANG$")) - inputJson = inputJson.replace("$3RDLANG$", BaseTestCase.languageList.get(2)); - response = patchWithPathParamsBodyAndCookie(ApplnURI + testCaseDTO.getEndPoint(), inputJson, COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName(), pathParams); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java index a09ba679b9..ad6f3bd222 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java @@ -31,7 +31,7 @@ import io.mosip.testrig.apirig.utils.AdminTestException; import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.utils.AuthenticationTestException; -import io.mosip.testrig.apirig.utils.ConfigManager; +import io.mosip.testrig.apirig.utils.IdAuthConfigManager; import io.mosip.testrig.apirig.utils.GlobalConstants; import io.mosip.testrig.apirig.utils.IdAuthenticationUtil; import io.mosip.testrig.apirig.utils.OutputValidationUtil; @@ -45,7 +45,7 @@ public class UpdateIdentity extends AdminTestUtil implements ITest { @BeforeClass public static void setLogLevel() { - if (ConfigManager.IsDebugEnabled()) + if (IdAuthConfigManager.IsDebugEnabled()) logger.setLevel(Level.ALL); else logger.setLevel(Level.ERROR); diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/utils/IdAuthConfigManager.java b/api-test/src/main/java/io/mosip/testrig/apirig/utils/IdAuthConfigManager.java new file mode 100644 index 0000000000..327d3ecdbc --- /dev/null +++ b/api-test/src/main/java/io/mosip/testrig/apirig/utils/IdAuthConfigManager.java @@ -0,0 +1,33 @@ +package io.mosip.testrig.apirig.utils; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +import org.apache.log4j.Logger; + +import io.mosip.testrig.apirig.testrunner.MosipTestRunner; + +public class IdAuthConfigManager extends ConfigManager{ + private static final Logger LOGGER = Logger.getLogger(IdAuthConfigManager.class); + + public static void init() { + Map moduleSpecificPropertiesMap = new HashMap<>(); + // Load scope specific properties + try { + String path = MosipTestRunner.getGlobalResourcePath() + "/config/Ida.properties"; + Properties props = getproperties(path); + // Convert Properties to Map and add to moduleSpecificPropertiesMap + for (String key : props.stringPropertyNames()) { + moduleSpecificPropertiesMap.put(key, props.getProperty(key)); + } + } catch (Exception e) { + LOGGER.error(e.getMessage()); + } + // Add module specific properties as well. + init(moduleSpecificPropertiesMap); + } + + + +} \ No newline at end of file diff --git a/api-test/src/main/resources/config/Ida.properties b/api-test/src/main/resources/config/Ida.properties new file mode 100644 index 0000000000..59e3d95223 --- /dev/null +++ b/api-test/src/main/resources/config/Ida.properties @@ -0,0 +1 @@ +#---------------------------------- End point(s) relative URLs ----------------------------------# diff --git a/api-test/src/main/resources/config/Kernel.properties b/api-test/src/main/resources/config/Kernel.properties deleted file mode 100644 index 3418be2260..0000000000 --- a/api-test/src/main/resources/config/Kernel.properties +++ /dev/null @@ -1,284 +0,0 @@ -#---------------------------------- End point(s) relative URLs ----------------------------------# -authclientidsecretkeyURL = /v1/authmanager/authenticate/clientidsecretkey -authentication = /v1/authmanager/authenticate/useridPwd -authenticationInternal = /v1/authmanager/authenticate/internal/useridPwd -keycloakAuthURL = /auth/realms/master/protocol/openid-connect/token -auditLog_URI = /v1/auditmanager/audits -CentetMachineUserMappingToMasterData_uri = /v1/masterdata/registrationmachineusermappings -EmailNotification_URI = /v1/notifier/email/send -encrypt_URI = /v1/keymanager/encrypt -decrypt_URI = /v1/keymanager/decrypt -FetchApplication_URI = /v1/masterdata/applicationtypes -FetchApplication_lang_URI = /v1/masterdata/applicationtypes/{langcode} -FetchApplication_id_lang_URI = /v1/masterdata/applicationtypes/{code}/{langcode} -FetchBiometricAttribute_URI = /v1/masterdata/getbiometricattributesbyauthtype/{langcode}/{biometrictypecode} -FetchBiometricAuthType_URI = /v1/masterdata/biometrictypes/{langcode} -FetchBlackListedWord_URI = /v1/masterdata/blacklistedwords/{langcode} -FetchDevice_lang_URI = /v1/masterdata/devices/{languagecode} -FetchDevice_id_lang_URI = /v1/masterdata/devices/{languagecode}/{deviceType} -FetchDeviceSpec_lang_URI = /v1/masterdata/devicespecifications/{langcode} -FetchDeviceSpec_id_lang_URI = /v1/masterdata/devicespecifications/{langcode}/{devicetypecode} -FetchDocumentCategories_URI = /v1/masterdata/documentcategories/{langcode} -FetchDocumentCategories_URI_withcodeAndLangCode = /v1/masterdata/documentcategories/{code}/{langcode} -FetchDocumentTypes_URI = /v1/masterdata/documenttypes/{documentcategorycode}/{langcode} -FetchGenderType_URI = /v1/masterdata/gendertypes -FetchGenderType_id_lang_URI = /v1/masterdata/gendertypes/{langcode} -FetchHolidays_URI = /v1/masterdata/holidays -FetchHolidays_id_URI = /v1/masterdata/holidays/{holidayid} -FetchHolidays_id_lang_URI = /v1/masterdata/holidays/{holidayid}/{langcode} -FetchIDlist_URI = /v1/masterdata/idtypes/{langcode} -FetchLocationHierarchy_URI_withlangCode = /v1/masterdata/locations/{langcode} -FetchLocationHierarchy_URI_locationcode = /v1/masterdata/locations/{locationcode}/{langcode} -FetchLocationHierarchy_URI_hierarchyname = /v1/masterdata/locations/locationhierarchy/{hierarchyname} -FetchMachine_URI = /v1/masterdata/machines -FetchMachine_lang_URI = /v1/masterdata/machines/{langcode} -FetchMachine_id_lang_URI = /v1/masterdata/machines/{id}/{langcode} -FetchMachineHistory_URI = /v1/masterdata/machineshistories/{id}/{langcode}/{effdatetimes} -FetchRegCent_URI = /v1/masterdata/registrationcenters -FetchRegCent_id_lang_URI = /v1/masterdata/registrationcenters/{id}/{langcode} -FetchRegCent_loc_lang_URI = /v1/masterdata/getlocspecificregistrationcenters/{langcode}/{locationcode} -FetchRegCent_hir_name_lang_URI = /v1/masterdata/registrationcenters/{langcode}/{hierarchylevel}/{name} -FetchRegCent_prox_lang_URI = /v1/masterdata/getcoordinatespecificregistrationcenters/{langcode}/{longitude}/{latitude}/{proximitydistance} -FetchRegCentHistory_URI = /v1/masterdata/registrationcentershistory/{registrationCenterId}/{langcode}/{effectiveDate} -FetchRegCentHolidays_URI = /v1/masterdata/getregistrationcenterholidays/{langcode}/{registrationcenterid}/{year} -FetchRegcentMachUserMaping_URI = /v1/masterdata/getregistrationmachineusermappinghistory/{effdtimes}/{registrationcenterid}/{machineid}/{userid} -FetchRejectionReason_URI = /v1/masterdata/packetrejectionreasons/{reasoncategorycode}/{langcode} -FetchTemplate_URI = /v1/masterdata/templates -FetchTemplate_lang_URI = /v1/masterdata/templates/{langcode} -FetchTemplate_id_lang_URI = /v1/masterdata/templates/{langcode}/{templatetypecode} -FetchTitle_URI = /v1/masterdata/title/{langcode} -fetchAllTemplate = /v1/masterdata/templates/templatetypecodes/{code} -getApplicantType = /v1/masterdata/getApplicantType -fetchDeviceHistory = /v1/masterdata/deviceshistories/{id}/{langcode}/{effdatetimes} -getDocType_DocCatByAppID = /v1/masterdata/applicanttype/{applicantId}/languages -getDocTypeDocCatByLangCode = /v1/masterdata/validdocuments/{languagecode} -fetchImmediateChildLocation = /v1/masterdata/locations/immediatechildren/{locationcode}/{langcode} -getIndividualType = /v1/masterdata/individualtypes -getRoles = /v1/syncdata/roles -fetchRegCenter = /v1/masterdata/registrationcenters/validate/{id}/{langCode}/{timestamp} -fetchRegistrationCenterDeviceHistory = /v1/masterdata/registrationcenterdevicehistory/{regcenterid}/{deviceid}/{effdatetimes} -getusersBasedOnRegCenter = /v1/syncdata/userdetails/{regid} -licKeyGenerator = /v1/keymanager/license/generate -mapLicenseKey = /v1/keymanager/license/permission -fetchmapLicenseKey = /v1/keymanager/license/permission -OTPGeneration = /v1/otpmanager/otp/generate -OTPValidation = /v1/otpmanager/otp/validate -otpNotifier = /v1/otpnotifier/otp/send -RIDGenerator_URI = /v1/ridgenerator/generate/rid/{centerid}/{machineid} -SmsNotification_URI = /v1/notifier/sms/send -syncConf = /v1/syncdata/configs -fetchIncrementalData = /v1/syncjob/syncjobdef -fetchmasterdata = /v1/syncdata/masterdata -fetchmasterdatawithRID = /v1/syncdata/masterdata/{regcenterId} -SyncPublicKeyToRegClient_URI = /v1/keymanager/publickey/ -uingenerator = /v1/idgenerator/uin -validateGenderByName = /v1/masterdata/gendertypes/validate/{gendername} -validateLocationByName = /v1/masterdata/locations/validate/{locationname} -tokenIdGenerator_URI = /v1/keymanager/{uin}/{partnercode} -getRIDByUserId = /v1/authmanager/rid/{appid}/{userid} -syncMdatawithKeyIndex = /v1/syncdata/clientsettings -syncMdatawithRegCentIdKeyIndex = /v1/syncdata/clientsettings/{regcenterid} -uploadpublickey = /v1/syncdata/tpm/publickey -getUserHistory = /v1/masterdata/users/{id}/{eff_dtimes} -sendOtp = /v1/authmanager/authenticate/sendotp -useridOTP = /v1/authmanager/authenticate/useridOTP -preregSendOtp = /preregistration/v1/login/sendOtp/langcode -preregValidateOtp = /preregistration/v1/login/validateOtp -zoneMappingUrl = /v1/masterdata/zoneuser -zoneNameUrl = /v1/masterdata/zones/zonename -zoneMappingActivateUrl = /v1/masterdata/zoneuser -userCenterMappingUrl = /v1/masterdata/usercentermapping -bulkUploadUrl = /v1/admin/bulkupload -currentUserURI=/#/uinservices/viewhistory -actuatorEndpoint=/resident/v1/actuator/env -actuatorAdminEndpoint=/v1/admin/actuator/env -actuatorMasterDataEndpoint=/v1/masterdata/actuator/env -actuatorIDAEndpoint=/idauthentication/v1/actuator/env -actuatorRegprocEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env -actuatorEsignetEndpoint=/v1/esignet/actuator/env -tokenEndpoint=/v1/esignet/oauth/token -auditActuatorEndpoint=/v1/auditmanager/actuator/info -validateBindingEndpoint=ida-binding -esignetWellKnownEndPoint=/v1/esignet/oidc/.well-known/openid-configuration -signupSettingsEndPoint=/v1/signup/settings -esignetActuatorPropertySection=esignet-default.properties - - - -#---------------------------------- APP IDs ----------------------------------# -#-- When test rig ran in docker, these values dervied from the environment ---# -mosip_pms_app_id = partner -mosip_resident_app_id = resident -mosip_idrepo_app_id = idrepo -mosip_regclient_app_id = registrationclient -mosip_hotlist_app_id = hotlist -mosip_regprocclient_app_id = regproc -AuthAppID = resident -mosip_admin_app_id = admin - - - -#---------------------------------- Client IDs -------------------------------# -#-- When test rig ran in docker, these values dervied from the environment ---# -mosip_pms_client_id = mosip-pms-client -mosip_partner_client_id = mosip-partner-client -mosip_resident_client_id = mosip-resident-client -mosip_idrepo_client_id = mosip-idrepo-client -mosip_reg_client_id = mosip-reg-client -mosip_admin_client_id = mosip-admin-client -mosip_hotlist_client_id = mosip-hotlist-client -mosip_regproc_client_id = mosip-regproc-client -mpartner_default_mobile_client_id = mpartner-default-mobile -mosip_testrig_client_id = mosip-testrig-client -AuthClientID = mosip-resident-client - - - -#---------------------------------- Client Secret Keys -----------------------# -#-- When test rig ran in docker, these values dervied from the environment ---# -mosip_partner_client_secret = -mosip_pms_client_secret = -mosip_resident_client_secret = -mosip_idrepo_client_secret = -mosip_reg_client_secret = -mosip_admin_client_secret = -mosip_hotlist_client_secret = -mosip_regproc_client_secret = -mpartner_default_mobile_secret = -mosip_testrig_client_secret = -AuthClientSecret = - - - -#----------------------------- minio proprties ------------------------------# -s3-user-key = minioadmin -s3-user-secret = minioadmin -s3-host = http://minio.minio:9000 -s3-account = automation -s3-region = null -reportExpirationInDays = 3 -s3-account-for-persona-data = personaData -push-reports-to-s3 = yes - - -#-------------------- Keycloak User Creation proprties ----------------------# -#-- When test rig ran in docker,few of below dervied from the environment ---# -new_Resident_User = 111995 -new_Resident_Password = mosip123 -new_Resident_Role = default-roles-mosip,PARTNER_ADMIN -roles.111995 = PARTNER_ADMIN,default-roles-mosip -keycloak_UserName = admin -keycloak_Password = -keycloak-external-url = https://iam.qa1-java21.mosip.net -keycloak-realm-id = mosip -iam-users-to-create=111997,111998,220005,111992,globaladmin,111999,111887 -iam-users-password=mosip123,mosip123,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 -roles.globaladmin = GLOBAL_ADMIN,REGISTRATION_ADMIN,uma_authorization,ZONAL_ADMIN,default-roles-mosip - - -#------------------------- DB Connectivity proprties ------------------------# -#-- When test rig ran in docker,few of below dervied from the environment ---# -driver_class=org.postgresql.Driver -pool_size=1 -dialect=org.hibernate.dialect.PostgreSQLDialect -show_sql=true -current_session_context_class=thread -audit_url=jdbc:postgresql://qa1-java21.mosip.net:5432/mosip_audit -audit_username=postgres -audit_password= -audit_default_schema=audit -DB_PORT= -installation-domain= -partner_url=jdbc:postgresql://qa1-java21.mosip.net:5432/mosip_ida -partner_username=postgres -partner_password= -partner_default_schema=partner -reportLogPath=automationLogAndReport -postgresqlUser=postgresql -db-port=5432 -db-server=qa1-java21.mosip.net -hibernate.connection.driver_class=org.postgresql.Driver -hibernate.connection.pool_size=1 -hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect -hibernate.show_sql=true -hibernate.current_session_context_class=thread -db-su-user=postgres -postgres-password= -pms_db_schema=pms -km_db_schema=keymgr -master_db_schema=master -audit_db_schema=audit -ida_db_schema=ida - - -#------------------------- DSL specific proprties ------------------------# -#------------------------- We need to see how to have DSL specific proprties file ------------------------# -packetUtilityBaseUrl=http://localhost:8080 -mountPathForScenario=D:/centralized/mountvolume -mountPath=/home/mosip/mountvolume -# Add scenarios to skip from automation and server side -# 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 -# supported values are 1 to 8 -threadCount=1 - -#------------------------ Generic properties ------------------------# -enableDebug=yes -preconfiguredOtp=111111 -usePreConfiguredOtp=false -# supported values yes or no. Assume that by Default e-signet is deployed -eSignetDeployed=yes -partnerUrlSuffix=oYf63Lax0DY2QkYMRHnrmDqhmO3RMWQagwm0ftgLlkuin1KOND/666/576732 -reportIgnoredTestCases=no -reportKnownIssueTestCases=no -servicesNotDeployed= -esignetMockBaseURL=esignet-insurance. -sunBirdBaseURL=registry -slack-webhook-url= -serverErrorsToMonitor=IDA-MLC-018 -pmsAuthInternal=true -partner_password=mosip123 -partner_userName=111997 -partner_revamp_userName=111999 -partner_user_password=mosip123 -policytest_password=mosip123 -policytest_userName=111998 -policytest_without_pmrole_userName=111887 -admin_password=mosip123 -admin_userName=220005 -admin_zone_password=mosip123 -admin_zone_userName=globaladmin -mockNotificationChannel=email,phone -mountPathForReport=/home/mosip/testrig/report - - - -#------------------------- Need to check if these are used or not ------------------------# -OTPTimeOut = 181 -attempt = 10 -ConfigParameters=mosip.kernel.rid.length,mosip.kernel.uin.length,mosip.kernel.sms.country.code,mosip.kernel.sms.number.length,mosip.kernel.otp.default-length,mosip.kernel.otp.expiry-time,mosip.kernel.otp.key-freeze-time,mosip.kernel.otp.validation-attempt-threshold,mosip.kernel.otp.min-key-length,mosip.kernel.otp.max-key-length,mosip.kernel.licensekey.length,mosip.supported-languages -# supported values are 0 ,1, 2 based on number of env languages -langselect=0 - - - -#----------------------------------AuthDemoService Host properties----------------------------------------------------------# -#Uncommemnt the below to run locally -#authCertsPath= -#Uncommemnt the below to run in Docker -authCertsPath=/home/mosip/authcerts - - -mosip_components_base_urls= -#auditmanager=api-internal.dev1.mosip.net;idrepository=api-internal.dev1.mosip.net;partnermanager=api-internal.qa-inji.mosip.net;idauthentication=api-internal.qa-inji.mosip.net;policymanager=api-internal.qa-inji.mosip.net \ No newline at end of file diff --git a/api-test/src/main/resources/ida/OtpInternalAuth/OtpInternalAuth.yml b/api-test/src/main/resources/ida/OtpInternalAuth/OtpInternalAuth.yml index 3037d611f0..a57c0ce983 100644 --- a/api-test/src/main/resources/ida/OtpInternalAuth/OtpInternalAuth.yml +++ b/api-test/src/main/resources/ida/OtpInternalAuth/OtpInternalAuth.yml @@ -30,7 +30,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_With_Valid_VID_Smoke_Pos: @@ -64,7 +64,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_With_Invalid_individualId_neg: @@ -104,7 +104,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_With_Blank_individualId_neg: @@ -144,7 +144,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_With_Missing_individualId_neg: @@ -184,7 +184,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_Invalid_transactionId_neg: @@ -224,7 +224,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_Blank_transactionId_neg: @@ -264,7 +264,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_Invalid_individualIdType_neg: @@ -304,7 +304,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_Blank_individualIdType_neg: @@ -344,7 +344,7 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' auth_OTP_Internal_Auth_Missing_individualIdType_neg: @@ -384,6 +384,6 @@ OTPInternalAuth: "transactionID": "$TRANSACTIONID$", "maskedMobile": "XXXXXX8538", "sendOtpResTemplate":"ida/OtpInternalAuth/sendOtpRes", - "maskedEmail": "XXkXXiXXb@technoforte.co.in" + "maskedEmail": "XXkXXiXXb@mailinator.co.in" } }' \ No newline at end of file diff --git a/api-test/src/main/resources/ida/SendOTP/createSendOTP.yml b/api-test/src/main/resources/ida/SendOTP/createSendOTP.yml index b51e42c6a0..0aa621c9c3 100644 --- a/api-test/src/main/resources/ida/SendOTP/createSendOTP.yml +++ b/api-test/src/main/resources/ida/SendOTP/createSendOTP.yml @@ -18,5 +18,5 @@ createSendOTP: }' output: '{ "maskedMobile": "$IGNORE$", - "maskedEmail": "XXkXXlXXhXXuXXr@technoforte.co.in" + "maskedEmail": "XXkXXlXXhXXuXXr@mailinator.co.in" }' \ No newline at end of file