3
3
// http://oss.oracle.com/licenses/upl.
4
4
package oracle .kubernetes .operator ;
5
5
6
- import static oracle .kubernetes .operator .BaseTest .getLeaseId ;
7
- import static oracle .kubernetes .operator .BaseTest .getProjectRoot ;
8
6
import static oracle .kubernetes .operator .BaseTest .initialize ;
9
7
import static oracle .kubernetes .operator .BaseTest .logger ;
10
8
23
21
24
22
public class ITSitConfig extends BaseTest {
25
23
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 = "" ;
31
24
private static String TESTSCRIPTDIR = "" ;
32
25
33
26
private static String ADMINPODNAME = "" ;
@@ -37,35 +30,7 @@ public class ITSitConfig extends BaseTest {
37
30
private static String fqdn = "" ;
38
31
39
32
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 ;
69
34
/**
70
35
* This method gets called only once before any of the test methods are executed. It does the
71
36
* initialization of the integration test properties defined in OperatorIT.properties and setting
@@ -79,10 +44,10 @@ public static void staticPrepare() throws Exception {
79
44
80
45
if (!QUICKTEST ) {
81
46
// initialize test properties and create the directories
82
- initialize (APPPROPSFILE );
47
+ initialize (APP_PROPS_FILE );
83
48
84
49
if (operator1 == null ) {
85
- operator1 = TestUtils .createOperator (OPERATOR1FILE );
50
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
86
51
}
87
52
TESTSCRIPTDIR = BaseTest .getProjectRoot () + "/integration-tests/src/test/resources/" ;
88
53
domain = createSitConfigDomain ();
@@ -116,10 +81,6 @@ public static void staticUnPrepare() throws Exception {
116
81
117
82
destroySitConfigDomain ();
118
83
tearDown ();
119
- if (!"" .equals (getLeaseId ())) {
120
- logger .info ("Release the k8s cluster lease" );
121
- TestUtils .releaseLease (getProjectRoot (), getLeaseId ());
122
- }
123
84
logger .info ("SUCCESS" );
124
85
}
125
86
}
@@ -225,7 +186,7 @@ public void testCustomSitConfigOverridesForWldf() throws Exception {
225
186
private static Domain createSitConfigDomain () throws Exception {
226
187
String createDomainScript = TESTSCRIPTDIR + "/domain-home-on-pv/create-domain.py" ;
227
188
// 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 );
229
190
domainMap .put ("configOverrides" , "sitconfigcm" );
230
191
domainMap .put (
231
192
"configOverridesFile" , "/integration-tests/src/test/resources/sitconfig/configoverrides" );
@@ -239,10 +200,6 @@ private static Domain createSitConfigDomain() throws Exception {
239
200
"javaOptions" ,
240
201
"-Dweblogic.debug.DebugSituationalConfig=true -Dweblogic.debug.DebugSituationalConfigDumpXml=true" );
241
202
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
- }
246
203
domain = TestUtils .createDomain (domainMap );
247
204
domain .verifyDomainCreated ();
248
205
return domain ;
0 commit comments