Skip to content

Commit

Permalink
Merge pull request #734 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
MOSIP-35404 | Move component specific test code from common to component api test rigs
  • Loading branch information
ckm007 authored Oct 3, 2024
2 parents 22414fd + 1d7c197 commit a4467e3
Showing 1 changed file with 1 addition and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ 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 (getRunType().equalsIgnoreCase("JAR")) {
ExtractResource.extractCommonResourceFromJar();
Expand Down Expand Up @@ -148,25 +149,6 @@ public static void startTestRunner() {
runner.run();
}

/**
* The method to return class loader resource path
*
* @return String
* @throws IOException
*/
/*
* public static String getGlobalResourcePath() { if
* (getRunType().equalsIgnoreCase("JAR")) { return new
* File(jarUrl).getParentFile().getAbsolutePath() +
* "/MosipTestResource/MosipTemporaryTestResource"; } else if
* (getRunType().equalsIgnoreCase("IDE")) { String path = new
* File(MosipTestRunner.class.getClassLoader().getResource("").getPath()).
* getAbsolutePath() + "/MosipTestResource/MosipTemporaryTestResource"; if
* (path.contains(GlobalConstants.TESTCLASSES)) path =
* path.replace(GlobalConstants.TESTCLASSES, "classes"); return path; } return
* "Global Resource File Path Not Found"; }
*/

public static String getGlobalResourcePath() {
if (cachedPath != null) {
return cachedPath;
Expand All @@ -192,15 +174,6 @@ public static String getGlobalResourcePath() {

public static String getResourcePath() {
return getGlobalResourcePath();
// if (getRunType().equalsIgnoreCase("JAR")) {
// return new File(jarUrl).getParentFile().getAbsolutePath();
// } 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");
// return path;
// }
// return "Global Resource File Path Not Found";
}

public static String generatePulicKey() {
Expand Down

0 comments on commit a4467e3

Please sign in to comment.