@@ -29,11 +29,10 @@ public class BaseTest {
29
29
protected static String wlsImgBldDir = "" ;
30
30
protected static String wlsImgCacheDir = "" ;
31
31
protected static String imagetool = "" ;
32
- private static String imagetoolZipfile = "" ;
33
32
private static int maxIterations = 50 ;
34
33
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 " ;
37
36
38
37
protected static void initialize () throws Exception {
39
38
logger .info ("Initializing the tests ..." );
@@ -51,8 +50,6 @@ protected static void initialize() throws Exception {
51
50
wlsImgCacheDir = System .getenv ("HOME" ) + FS + "cache" ;
52
51
}
53
52
54
- imagetoolZipfile = getImagetoolZipfile ();
55
-
56
53
imagetool = "java -cp \" " + getImagetoolHome () + FS + "lib" + FS + "*\" -Djava.util.logging.config.file=" +
57
54
getImagetoolHome () + FS + "bin" + FS + "logging.properties com.oracle.weblogic.imagetool.cli.CLIDriver" ;
58
55
@@ -67,8 +64,8 @@ protected static void setup() throws Exception {
67
64
String command = "/bin/rm -rf " + getImagetoolHome ();
68
65
executeNoVerify (command );
69
66
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 ;
72
69
executeNoVerify (command );
73
70
74
71
command = "source " + getImagetoolHome () + FS + "bin" + FS + "setup.sh" ;
@@ -155,9 +152,8 @@ protected static String getTargetDir() {
155
152
}
156
153
157
154
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 ;
161
157
}
162
158
163
159
protected static String getInstallerCacheDir () {
@@ -319,9 +315,4 @@ private static void checkCmdInLoop(String cmd, String matchStr)
319
315
}
320
316
}
321
317
}
322
-
323
- private static String getImagetoolZipfile () throws Exception {
324
- String version = System .getProperty ("imagetoolversion" );
325
- return IMAGETOOLZIPFILE_PREFIX + version + IMAGETOOLZIPFILE_SUFFIX ;
326
- }
327
318
}
0 commit comments