@@ -29,11 +29,10 @@ public class BaseTest {
2929 protected static String wlsImgBldDir = "" ;
3030 protected static String wlsImgCacheDir = "" ;
3131 protected static String imagetool = "" ;
32- private static String imagetoolZipfile = "" ;
3332 private static int maxIterations = 50 ;
3433 private static int waitTime = 5 ;
35- private static String IMAGETOOLZIPFILE_PREFIX = "imagetool- " ;
36- private static String IMAGETOOLZIPFILE_SUFFIX = ".zip " ;
34+ private static String IMAGETOOLZIPFILE = "imagetool.zip " ;
35+ private static String IMAGETOOLDIR = "imagetool " ;
3736
3837 protected static void initialize () throws Exception {
3938 logger .info ("Initializing the tests ..." );
@@ -51,8 +50,6 @@ protected static void initialize() throws Exception {
5150 wlsImgCacheDir = System .getenv ("HOME" ) + FS + "cache" ;
5251 }
5352
54- imagetoolZipfile = getImagetoolZipfile ();
55-
5653 imagetool = "java -cp \" " + getImagetoolHome () + FS + "lib" + FS + "*\" -Djava.util.logging.config.file=" +
5754 getImagetoolHome () + FS + "bin" + FS + "logging.properties com.oracle.weblogic.imagetool.cli.CLIDriver" ;
5855
@@ -67,8 +64,8 @@ protected static void setup() throws Exception {
6764 String command = "/bin/rm -rf " + getImagetoolHome ();
6865 executeNoVerify (command );
6966
70- // unzip the weblogic-image-tool/imagetool/target/imagetool-${VERSION}-SNAPSHOT .zip
71- command = "/bin/unzip " + getTargetDir () + FS + imagetoolZipfile ;
67+ // unzip the weblogic-image-tool/imagetool/target/imagetool.zip
68+ command = "/bin/unzip " + getTargetDir () + FS + IMAGETOOLZIPFILE ;
7269 executeNoVerify (command );
7370
7471 command = "source " + getImagetoolHome () + FS + "bin" + FS + "setup.sh" ;
@@ -155,9 +152,8 @@ protected static String getTargetDir() {
155152 }
156153
157154 protected static String getImagetoolHome () throws Exception {
158- int endIndex = getImagetoolZipfile ().length () - IMAGETOOLZIPFILE_SUFFIX .length ();
159- String imagetooldir = getImagetoolZipfile ().substring (0 , endIndex );
160- return getProjectRoot () + FS + imagetooldir ;
155+
156+ return getProjectRoot () + FS + IMAGETOOLDIR ;
161157 }
162158
163159 protected static String getInstallerCacheDir () {
@@ -319,9 +315,4 @@ private static void checkCmdInLoop(String cmd, String matchStr)
319315 }
320316 }
321317 }
322-
323- private static String getImagetoolZipfile () throws Exception {
324- String version = System .getProperty ("imagetoolversion" );
325- return IMAGETOOLZIPFILE_PREFIX + version + IMAGETOOLZIPFILE_SUFFIX ;
326- }
327318}
0 commit comments