Skip to content

Commit e1cd6c2

Browse files
committed
fix the sitconfig dir location
1 parent bd4a9dd commit e1cd6c2

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/BaseTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public class BaseTest {
5656
private static String resultDir = "";
5757
private static String userProjectsDir = "";
5858
private static String projectRoot = "";
59-
protected static String sitconfigDir = "";
6059
private static String username = "weblogic";
6160
private static String password = "welcome1";
6261
private static int maxIterationsPod = 50;
@@ -116,7 +115,6 @@ public static void initialize(String appPropsFile) throws Exception {
116115
resultDir = resultRoot + "/acceptance_test_tmp";
117116
userProjectsDir = resultDir + "/user-projects";
118117
projectRoot = System.getProperty("user.dir") + "/..";
119-
sitconfigDir = resultRoot + "/configoverridefiles";
120118

121119
// BRANCH_NAME var is used in Jenkins job
122120
if (System.getenv("BRANCH_NAME") != null) {
@@ -160,16 +158,12 @@ public static void initialize(String appPropsFile) throws Exception {
160158
"/usr/local/packages/aime/ias/run_as_root \"chmod 777 "
161159
+ pvRoot
162160
+ "/acceptance_test_pv\"");
163-
logger.info("Creating " + sitconfigDir);
164-
TestUtils.exec("/usr/local/packages/aime/ias/run_as_root \"mkdir -p " + sitconfigDir + "\"");
165-
TestUtils.exec("/usr/local/packages/aime/ias/run_as_root \"chmod 777 " + sitconfigDir + "\"");
166161
}
167162

168163
// create resultRoot, PVRoot, etc
169164
Files.createDirectories(Paths.get(resultRoot));
170165
Files.createDirectories(Paths.get(resultDir));
171166
Files.createDirectories(Paths.get(userProjectsDir));
172-
Files.createDirectories(Paths.get(sitconfigDir));
173167

174168
// create file handler
175169
FileHandler fh = new FileHandler(resultDir + "/java_test_suite.out");

integration-tests/src/test/java/oracle/kubernetes/operator/ITSitConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class ITSitConfig extends BaseTest {
3838
private static String KUBE_EXEC_CMD;
3939
private static Domain domain;
4040
private static Operator operator1;
41-
41+
private static String sitconfigDir = "";
4242
/**
4343
* This method gets called only once before any of the test methods are executed. It does the
4444
* initialization of the integration test properties defined in OperatorIT.properties and setting
@@ -56,6 +56,7 @@ public static void staticPrepare() throws Exception {
5656
operator1 = TestUtils.createOperator(OPERATOR1_YAML);
5757
}
5858
TESTSCRIPTDIR = BaseTest.getProjectRoot() + "/integration-tests/src/test/resources/";
59+
sitconfigDir = BaseTest.getResultDir() + "/configoverridefiles";
5960
// Create the MySql db container
6061
ExecResult result =
6162
TestUtils.exec(
@@ -281,6 +282,7 @@ private static void destroySitConfigDomain() throws Exception {
281282
*/
282283
private static void copySitConfigFiles() throws IOException {
283284
String src_dir = TESTSCRIPTDIR + "/sitconfig/configoverrides";
285+
Files.createDirectories(Paths.get(sitconfigDir));
284286
String dst_dir = sitconfigDir;
285287
String files[] = {
286288
"config.xml",

integration-tests/src/test/resources/sitconfig/java/SitConfigTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
* weblogic-kubernetes-operator integration test suite.
5252
*
5353
* <p>The JUnit wrapper test class oracle.kubernetes.operator.ITSitConfig running in functional
54-
* integration test suite calls this Main class recursively to run individual override verification
55-
* tests. The class exits with exception if any of the asserts fail and exit status 1 or gracefully
56-
* exits with status 0 when all of the asserts pass.
54+
* integration test suite calls this Main class to run individual override verification tests. The
55+
* class exits with exception if any of the asserts fail and exit status 1 or gracefully exits with
56+
* status 0 when all of the asserts pass.
5757
*
5858
* <p>The class takes a minimum of four arguments - administration server host, administration
5959
* server port, administration server user name and administration server password. When

0 commit comments

Comments
 (0)