Skip to content

Commit a4c7585

Browse files
authored
Generate the sample archive in the target/resources directory (#752)
1 parent 776a738 commit a4c7585

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

system-test/src/test/java/oracle/weblogic/deploy/integration/BaseTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,18 @@ protected static String getResourcePath() {
197197
return getProjectRoot() + FS + "src" + FS + "test" + FS + "resources";
198198
}
199199

200+
protected static String getGeneratedResourcePath() {
201+
return getTargetDir() + FS + "resources";
202+
}
203+
200204
protected static ExecResult buildSampleArchive() throws Exception {
201205
logger.info("Building WDT archive ...");
202206
String command = "sh " + getResourcePath() + FS + "build-archive.sh";
203207
return executeAndVerify(command, true);
204208
}
205209

206210
protected static String getSampleArchiveFile() throws Exception {
207-
return getResourcePath() + FS + SAMPLE_ARCHIVE_FILE;
211+
return getGeneratedResourcePath() + FS + SAMPLE_ARCHIVE_FILE;
208212
}
209213

210214
protected static String getSampleModelFile(String suffix) throws Exception {
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/bin/sh
22
#
3-
#Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2018, 2020, Oracle and/or its affiliates.
44
#
5-
#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
5+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
66
#
7-
rm -Rf src/test/resources/archive
8-
mkdir -p src/test/resources/archive/wlsdeploy/applications
7+
projectDir=$(pwd)
8+
archiveDir=${projectDir}/target/resources/archive
9+
rm -Rf $archiveDir
10+
mkdir -p $archiveDir/wlsdeploy/applications
911
cd ../samples/docker-domain/simple-app
10-
jar cvf ../../../system-test/src/test/resources/archive/wlsdeploy/applications/simple-app.war *
11-
cd ../../../system-test/src/test/resources/archive
12+
jar cvf $archiveDir/wlsdeploy/applications/simple-app.war *
13+
cd $archiveDir
1214
jar cvf ../archive.zip *

0 commit comments

Comments
 (0)