Skip to content

Commit ad5f143

Browse files
MOSIP-35628: Check and report CAPTCHA status only once during test execution. (mosip#370)
* MOSIP-40258 Signed-off-by: SradhaMohanty5899 <[email protected]> * MOSIP-28246 Removed unused variables from injicertify module Signed-off-by: SradhaMohanty5899 <[email protected]> * MOSIP-28246 Removed commented unused variables Signed-off-by: SradhaMohanty5899 <[email protected]> * MOSIP-35628 API - Capture info in the report whether Captcha is enabled on the target env or not Signed-off-by: SradhaMohanty5899 <[email protected]> * MOSIP-35628 Signed-off-by: SradhaMohanty5899 <[email protected]> * MOSIP-35628 Changed SNAPSHOT version Signed-off-by: SradhaMohanty5899 <[email protected]> * DSD-8335 Signed-off-by: SradhaMohanty5899 <[email protected]> * Removed previously added dependancy Signed-off-by: SradhaMohanty5899 <[email protected]> * Removed danubtech repository from Pom Signed-off-by: SradhaMohanty5899 <[email protected]> * Check and report CAPTCHA status only once during test execution. Signed-off-by: SradhaMohanty5899 <[email protected]> * Removed getValueFromEsignetActuator() method Signed-off-by: SradhaMohanty5899 <[email protected]> --------- Signed-off-by: SradhaMohanty5899 <[email protected]>
1 parent deb22f5 commit ad5f143

File tree

3 files changed

+2
-41
lines changed

3 files changed

+2
-41
lines changed

api-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<dependency>
6969
<groupId>io.mosip.testrig.apitest.commons</groupId>
7070
<artifactId>apitest-commons</artifactId>
71-
<version>1.3.3-SNAPSHOT</version>
71+
<version>1.3.3</version>
7272
</dependency>
7373
<dependency>
7474
<groupId>com.github.openjson</groupId>

api-test/src/main/java/io/mosip/testrig/apirig/injicertify/testrunner/MosipTestRunner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public static void main(String[] arg) {
8080
suiteSetup(getRunType());
8181
SkipTestCaseHandler.loadTestcaseToBeSkippedList("testCaseSkippedList.txt");
8282
GlobalMethods.setModuleNameAndReCompilePattern(InjiCertifyConfigManager.getproperty("moduleNamePattern"));
83+
GlobalMethods.reportCaptchaStatus(GlobalConstants.CAPTCHA_ENABLED, false);
8384
setLogLevels();
8485

8586
useCaseToExecute = InjiCertifyConfigManager.getproperty("useCaseToExecute");

api-test/src/main/java/io/mosip/testrig/apirig/injicertify/utils/InjiCertifyUtil.java

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -513,44 +513,6 @@ public static String replaceKeywordValue(String jsonString, String keyword, Stri
513513
}
514514
}
515515

516-
public static JSONArray esignetActuatorResponseArray = null;
517-
518-
public static String getValueFromEsignetActuator(String section, String key) {
519-
String url = InjiCertifyConfigManager.getEsignetBaseUrl() + InjiCertifyConfigManager.getproperty("actuatorEsignetEndpoint");
520-
String actuatorCacheKey = url + section + key;
521-
String value = actuatorValueCache.get(actuatorCacheKey);
522-
if (value != null && !value.isEmpty())
523-
return value;
524-
525-
try {
526-
if (esignetActuatorResponseArray == null) {
527-
Response response = null;
528-
JSONObject responseJson = null;
529-
response = RestClient.getRequest(url, MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON);
530-
responseJson = new JSONObject(response.getBody().asString());
531-
esignetActuatorResponseArray = responseJson.getJSONArray("propertySources");
532-
}
533-
534-
for (int i = 0, size = esignetActuatorResponseArray.length(); i < size; i++) {
535-
JSONObject eachJson = esignetActuatorResponseArray.getJSONObject(i);
536-
if (eachJson.get("name").toString().contains(section)) {
537-
value = eachJson.getJSONObject(GlobalConstants.PROPERTIES).getJSONObject(key)
538-
.get(GlobalConstants.VALUE).toString();
539-
if (InjiCertifyConfigManager.IsDebugEnabled())
540-
logger.info("Actuator: " + url + " key: " + key + " value: " + value);
541-
break;
542-
}
543-
}
544-
actuatorValueCache.put(actuatorCacheKey, value);
545-
546-
return value;
547-
} catch (Exception e) {
548-
logger.error(GlobalConstants.EXCEPTION_STRING_2 + e);
549-
return value;
550-
}
551-
552-
}
553-
554516
public static Map<String, List<String>> proofSigningAlgorithmsMap = new HashMap<>();
555517

556518
public static String getJsonFromInjiCertifyWellKnownEndPoint() {
@@ -875,8 +837,6 @@ public static TestCaseDTO isTestCaseValidForExecution(TestCaseDTO testCaseDTO) {
875837
if (isCaptchaEnabled() == true) {
876838
GlobalMethods.reportCaptchaStatus(GlobalConstants.CAPTCHA_ENABLED, true);
877839
throw new SkipException(GlobalConstants.CAPTCHA_ENABLED_MESSAGE);
878-
}else {
879-
GlobalMethods.reportCaptchaStatus(GlobalConstants.CAPTCHA_ENABLED, false);
880840
}
881841

882842
if (MosipTestRunner.skipAll == true) {

0 commit comments

Comments
 (0)