Skip to content

Commit 5368808

Browse files
committed
more changes
1 parent 15dd2db commit 5368808

File tree

5 files changed

+13
-74
lines changed

5 files changed

+13
-74
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,27 +139,6 @@ public static void initialize(String appPropsFile) throws Exception {
139139
+ clnResult.stderr());
140140
}
141141

142-
if (System.getenv("JENKINS") != null) {
143-
logger.info("Creating " + resultRoot + "/acceptance_test_tmp");
144-
TestUtils.exec(
145-
"/usr/local/packages/aime/ias/run_as_root \"mkdir -p "
146-
+ resultRoot
147-
+ "/acceptance_test_tmp\"");
148-
TestUtils.exec(
149-
"/usr/local/packages/aime/ias/run_as_root \"chmod 777 "
150-
+ resultRoot
151-
+ "/acceptance_test_tmp\"");
152-
logger.info("Creating " + pvRoot + "/acceptance_test_pv");
153-
TestUtils.exec(
154-
"/usr/local/packages/aime/ias/run_as_root \"mkdir -p "
155-
+ pvRoot
156-
+ "/acceptance_test_pv\"");
157-
TestUtils.exec(
158-
"/usr/local/packages/aime/ias/run_as_root \"chmod 777 "
159-
+ pvRoot
160-
+ "/acceptance_test_pv\"");
161-
}
162-
163142
// create resultRoot, PVRoot, etc
164143
Files.createDirectories(Paths.get(resultRoot));
165144
Files.createDirectories(Paths.get(resultDir));

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ public static void staticUnPrepare() throws Exception {
5353
logger.info("+++++++++++++++++++++++++++++++++---------------------------------+");
5454
logger.info("BEGIN");
5555
logger.info("Run once, release cluster lease");
56+
5657
tearDown();
58+
5759
logger.info("SUCCESS");
5860
}
5961

@@ -87,7 +89,9 @@ public void testDomainOnPVUsingWLST() throws Exception {
8789
testBasicUseCases(domain);
8890
TestUtils.renewK8sClusterLease(getProjectRoot(), getLeaseId());
8991
testAdvancedUseCasesForADomain(operator1, domain);
92+
9093
if (!SMOKETEST) domain.testWlsLivenessProbe();
94+
9195
testCompletedSuccessfully = true;
9296
} finally {
9397
if (domain != null && !SMOKETEST && (JENKINS || testCompletedSuccessfully))

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

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// http://oss.oracle.com/licenses/upl.
44
package oracle.kubernetes.operator;
55

6-
import static oracle.kubernetes.operator.BaseTest.getLeaseId;
7-
import static oracle.kubernetes.operator.BaseTest.getProjectRoot;
86
import static oracle.kubernetes.operator.BaseTest.initialize;
97
import static oracle.kubernetes.operator.BaseTest.logger;
108

@@ -23,11 +21,6 @@
2321

2422
public class ITSitConfig extends BaseTest {
2523

26-
private static final String OPERATOR1FILE = "operator1.yaml";
27-
private static final String OPERATOR2FILE = "operator2.yaml";
28-
private static final String DOMAINONPVWLSTFILE = "domainonpvwlst.yaml";
29-
private static final String DOMAINONPVWDTFILE = "domainonpvwdt.yaml";
30-
private static String TESTSRCDIR = "";
3124
private static String TESTSCRIPTDIR = "";
3225

3326
private static String ADMINPODNAME = "";
@@ -37,35 +30,7 @@ public class ITSitConfig extends BaseTest {
3730
private static String fqdn = "";
3831

3932
private static Domain domain = null;
40-
private static Operator operator1, operator2;
41-
// property file used to configure constants for integration tests
42-
private static final String APPPROPSFILE = "OperatorIT.properties";
43-
44-
private static boolean QUICKTEST;
45-
private static final boolean SMOKETEST;
46-
private static boolean JENKINS;
47-
private static boolean INGRESSPERDOMAIN = true;
48-
49-
// Set QUICKTEST env var to true to run a small subset of tests.
50-
// Set SMOKETEST env var to true to run an even smaller subset
51-
// of tests, plus leave domain1 up and running when the test completes.
52-
// set INGRESSPERDOMAIN to false to create LB's ingress by kubectl yaml file
53-
static {
54-
QUICKTEST =
55-
System.getenv("QUICKTEST") != null && System.getenv("QUICKTEST").equalsIgnoreCase("true");
56-
SMOKETEST =
57-
System.getenv("SMOKETEST") != null && System.getenv("SMOKETEST").equalsIgnoreCase("true");
58-
if (SMOKETEST) {
59-
QUICKTEST = true;
60-
}
61-
if (System.getenv("JENKINS") != null) {
62-
JENKINS = Boolean.valueOf(System.getenv("JENKINS"));
63-
}
64-
if (System.getenv("INGRESSPERDOMAIN") != null) {
65-
INGRESSPERDOMAIN = Boolean.valueOf(System.getenv("INGRESSPERDOMAIN"));
66-
}
67-
}
68-
33+
private static Operator operator1;
6934
/**
7035
* This method gets called only once before any of the test methods are executed. It does the
7136
* initialization of the integration test properties defined in OperatorIT.properties and setting
@@ -79,10 +44,10 @@ public static void staticPrepare() throws Exception {
7944

8045
if (!QUICKTEST) {
8146
// initialize test properties and create the directories
82-
initialize(APPPROPSFILE);
47+
initialize(APP_PROPS_FILE);
8348

8449
if (operator1 == null) {
85-
operator1 = TestUtils.createOperator(OPERATOR1FILE);
50+
operator1 = TestUtils.createOperator(OPERATOR1_YAML);
8651
}
8752
TESTSCRIPTDIR = BaseTest.getProjectRoot() + "/integration-tests/src/test/resources/";
8853
domain = createSitConfigDomain();
@@ -116,10 +81,6 @@ public static void staticUnPrepare() throws Exception {
11681

11782
destroySitConfigDomain();
11883
tearDown();
119-
if (!"".equals(getLeaseId())) {
120-
logger.info("Release the k8s cluster lease");
121-
TestUtils.releaseLease(getProjectRoot(), getLeaseId());
122-
}
12384
logger.info("SUCCESS");
12485
}
12586
}
@@ -225,7 +186,7 @@ public void testCustomSitConfigOverridesForWldf() throws Exception {
225186
private static Domain createSitConfigDomain() throws Exception {
226187
String createDomainScript = TESTSCRIPTDIR + "/domain-home-on-pv/create-domain.py";
227188
// load input yaml to map and add configOverrides
228-
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAINONPVWLSTFILE);
189+
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAINONPV_WLST_YAML);
229190
domainMap.put("configOverrides", "sitconfigcm");
230191
domainMap.put(
231192
"configOverridesFile", "/integration-tests/src/test/resources/sitconfig/configoverrides");
@@ -239,10 +200,6 @@ private static Domain createSitConfigDomain() throws Exception {
239200
"javaOptions",
240201
"-Dweblogic.debug.DebugSituationalConfig=true -Dweblogic.debug.DebugSituationalConfigDumpXml=true");
241202

242-
// use NFS for this domain on Jenkins, defaultis HOST_PATH
243-
if (System.getenv("JENKINS") != null && System.getenv("JENKINS").equalsIgnoreCase("true")) {
244-
domainMap.put("weblogicDomainStorageType", "NFS");
245-
}
246203
domain = TestUtils.createDomain(domainMap);
247204
domain.verifyDomainCreated();
248205
return domain;

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
5-
*/
1+
// Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at
3+
// http://oss.oracle.com/licenses/upl.
4+
65
package oracle.kubernetes.operator;
76

87
import java.io.IOException;

integration-tests/src/test/resources/sitconfig/scripts/create-domain-auto-custom-sit-config20.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33

44
def getEnvVar(var):

0 commit comments

Comments
 (0)