27
27
@ FixMethodOrder (MethodSorters .NAME_ASCENDING )
28
28
public class ITOperator extends BaseTest {
29
29
30
- // property file used to customize operator properties for operator inputs yaml
31
-
32
- private static String operator1File = "operator1.yaml" ;
33
- private static String operator2File = "operator2.yaml" ;
34
- private static final String operator_bcFile = "operator_bc.yaml" ;
35
- private static final String operator_chainFile = "operator_chain.yaml" ;
36
-
37
- // file used to customize domain properties for domain, PV and LB inputs yaml
38
- private static String domainonpvwlstFile = "domainonpvwlst.yaml" ;
39
- private static String domainonpvwdtFile = "domainonpvwdt.yaml" ;
40
- private static String domainadminonlyFile = "domainadminonly.yaml" ;
41
- private static String domainrecyclepolicyFile = "domainrecyclepolicy.yaml" ;
42
- private static String domainsampledefaultsFile = "domainsampledefaults.yaml" ;
43
- private static String domaininimagewlstFile = "domaininimagewlst.yaml" ;
44
- private static String domaininimagewdtFile = "domaininimagewdt.yaml" ;
45
-
46
- // property file used to configure constants for integration tests
47
- private static String appPropsFile = "OperatorIT.properties" ;
48
-
49
30
private static Operator operator1 , operator2 ;
50
31
51
32
private static Operator operatorForBackwardCompatibility ;
52
33
private static Operator operatorForRESTCertChain ;
53
34
54
- private static boolean QUICKTEST ;
55
- private static boolean SMOKETEST ;
56
- private static boolean JENKINS ;
57
-
58
- // Set QUICKTEST env var to true to run a small subset of tests.
59
- // Set SMOKETEST env var to true to run an even smaller subset
60
- // of tests, plus leave domain1 up and running when the test completes.
61
- static {
62
- QUICKTEST =
63
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" );
64
- SMOKETEST =
65
- System .getenv ("SMOKETEST" ) != null && System .getenv ("SMOKETEST" ).equalsIgnoreCase ("true" );
66
- if (SMOKETEST ) QUICKTEST = true ;
67
- if (System .getenv ("JENKINS" ) != null ) {
68
- JENKINS = new Boolean (System .getenv ("JENKINS" )).booleanValue ();
69
- }
70
- }
71
-
72
35
/**
73
36
* This method gets called only once before any of the test methods are executed. It does the
74
37
* initialization of the integration test properties defined in OperatorIT.properties and setting
@@ -79,7 +42,7 @@ public class ITOperator extends BaseTest {
79
42
@ BeforeClass
80
43
public static void staticPrepare () throws Exception {
81
44
// initialize test properties and create the directories
82
- initialize (appPropsFile );
45
+ initialize (APP_PROPS_FILE );
83
46
}
84
47
85
48
/**
@@ -136,12 +99,12 @@ public void testDomainOnPVUsingWLST() throws Exception {
136
99
logger .info ("Creating Operator & waiting for the script to complete execution" );
137
100
// create operator1
138
101
if (operator1 == null ) {
139
- operator1 = TestUtils .createOperator (operator1File );
102
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
140
103
}
141
104
Domain domain = null ;
142
105
boolean testCompletedSuccessfully = false ;
143
106
try {
144
- domain = TestUtils .createDomain (domainonpvwlstFile );
107
+ domain = TestUtils .createDomain (DOMAINONPV_WLST_YAML );
145
108
domain .verifyDomainCreated ();
146
109
testBasicUseCases (domain );
147
110
testAdvancedUseCasesForADomain (operator1 , domain );
@@ -175,13 +138,13 @@ public void testDomainOnPVUsingWDT() throws Exception {
175
138
logger .info ("Creating Domain using DomainOnPVUsingWDT & verifing the domain creation" );
176
139
177
140
if (operator2 == null ) {
178
- operator2 = TestUtils .createOperator (operator2File );
141
+ operator2 = TestUtils .createOperator (OPERATOR2_YAML );
179
142
}
180
143
Domain domain = null ;
181
144
boolean testCompletedSuccessfully = false ;
182
145
try {
183
146
// create domain
184
- domain = TestUtils .createDomain (domainonpvwdtFile );
147
+ domain = TestUtils .createDomain (DOMAINONPV_WDT_YAML );
185
148
domain .verifyDomainCreated ();
186
149
testBasicUseCases (domain );
187
150
testWLDFScaling (operator2 , domain );
@@ -220,14 +183,14 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
220
183
221
184
logger .info ("Checking if operator1 and domain1 are running, if not creating" );
222
185
if (operator1 == null ) {
223
- operator1 = TestUtils .createOperator (operator1File );
186
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
224
187
}
225
188
226
189
Domain domain1 = null , domain2 = null ;
227
190
boolean testCompletedSuccessfully = false ;
228
191
try {
229
192
// load input yaml to map and add configOverrides
230
- Map <String , Object > wlstDomainMap = TestUtils .loadYaml (domainonpvwlstFile );
193
+ Map <String , Object > wlstDomainMap = TestUtils .loadYaml (DOMAINONPV_WLST_YAML );
231
194
wlstDomainMap .put ("domainUID" , "domain1onpvwlst" );
232
195
wlstDomainMap .put ("adminNodePort" , new Integer ("30702" ));
233
196
wlstDomainMap .put ("t3ChannelPort" , new Integer ("30031" ));
@@ -237,12 +200,12 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
237
200
testBasicUseCases (domain1 );
238
201
logger .info ("Checking if operator2 is running, if not creating" );
239
202
if (operator2 == null ) {
240
- operator2 = TestUtils .createOperator (operator2File );
203
+ operator2 = TestUtils .createOperator (OPERATOR2_YAML );
241
204
}
242
205
// create domain2 with configured cluster
243
206
// ToDo: configured cluster support is removed from samples, modify the test to create
244
207
// configured cluster
245
- Map <String , Object > wdtDomainMap = TestUtils .loadYaml (domainonpvwdtFile );
208
+ Map <String , Object > wdtDomainMap = TestUtils .loadYaml (DOMAINONPV_WDT_YAML );
246
209
wdtDomainMap .put ("domainUID" , "domain2onpvwdt" );
247
210
wdtDomainMap .put ("adminNodePort" , new Integer ("30703" ));
248
211
wdtDomainMap .put ("t3ChannelPort" , new Integer ("30041" ));
@@ -299,14 +262,14 @@ public void testCreateDomainWithStartPolicyAdminOnly() throws Exception {
299
262
logTestBegin (testMethodName );
300
263
logger .info ("Checking if operator1 is running, if not creating" );
301
264
if (operator1 == null ) {
302
- operator1 = TestUtils .createOperator (operator1File );
265
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
303
266
}
304
267
logger .info ("Creating Domain domain6 & verifing the domain creation" );
305
268
// create domain
306
269
Domain domain = null ;
307
270
boolean testCompletedSuccessfully = false ;
308
271
try {
309
- domain = TestUtils .createDomain (domainadminonlyFile );
272
+ domain = TestUtils .createDomain (DOMAIN_ADMINONLY_YAML );
310
273
domain .verifyDomainCreated ();
311
274
} finally {
312
275
if (domain != null ) {
@@ -332,14 +295,14 @@ public void testCreateDomainPVReclaimPolicyRecycle() throws Exception {
332
295
logTestBegin (testMethodName );
333
296
logger .info ("Checking if operator1 is running, if not creating" );
334
297
if (operator1 == null ) {
335
- operator1 = TestUtils .createOperator (operator1File );
298
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
336
299
}
337
300
logger .info ("Creating Domain domain & verifing the domain creation" );
338
301
// create domain
339
302
Domain domain = null ;
340
303
341
304
try {
342
- domain = TestUtils .createDomain (domainrecyclepolicyFile );
305
+ domain = TestUtils .createDomain (DOMAIN_RECYCLEPOLICY_YAML );
343
306
domain .verifyDomainCreated ();
344
307
} finally {
345
308
if (domain != null ) domain .shutdown ();
@@ -365,14 +328,14 @@ public void testCreateDomainWithDefaultValuesInSampleInputs() throws Exception {
365
328
logTestBegin (testMethodName );
366
329
logger .info ("Creating Domain domain10 & verifing the domain creation" );
367
330
if (operator1 == null ) {
368
- operator1 = TestUtils .createOperator (operator1File );
331
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
369
332
}
370
333
371
334
// create domain10
372
335
Domain domain = null ;
373
336
boolean testCompletedSuccessfully = false ;
374
337
try {
375
- domain = TestUtils .createDomain (domainsampledefaultsFile );
338
+ domain = TestUtils .createDomain (DOMAIN_SAMPLE_DEFAULTS_YAML );
376
339
domain .verifyDomainCreated ();
377
340
testBasicUseCases (domain );
378
341
// testAdvancedUseCasesForADomain(operator1, domain10);
@@ -404,13 +367,13 @@ public void testAutoAndCustomSitConfigOverrides() throws Exception {
404
367
logTestBegin (testMethod );
405
368
406
369
if (operator1 == null ) {
407
- operator1 = TestUtils .createOperator (operator1File );
370
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
408
371
}
409
372
Domain domain11 = null ;
410
373
boolean testCompletedSuccessfully = false ;
411
374
try {
412
375
// load input yaml to map and add configOverrides
413
- Map <String , Object > domainMap = TestUtils .loadYaml (domainonpvwlstFile );
376
+ Map <String , Object > domainMap = TestUtils .loadYaml (DOMAINONPV_WLST_YAML );
414
377
domainMap .put ("configOverrides" , "sitconfigcm" );
415
378
domainMap .put (
416
379
"configOverridesFile" ,
@@ -457,7 +420,7 @@ public void testOperatorRESTIdentityBackwardCompatibility() throws Exception {
457
420
logger .info ("Checking if operatorForBackwardCompatibility is running, if not creating" );
458
421
if (operatorForBackwardCompatibility == null ) {
459
422
operatorForBackwardCompatibility =
460
- TestUtils .createOperator (operator_bcFile , RESTCertType .LEGACY );
423
+ TestUtils .createOperator (OPERATORBC_YAML , RESTCertType .LEGACY );
461
424
}
462
425
operatorForBackwardCompatibility .verifyOperatorExternalRESTEndpoint ();
463
426
logger .info ("Operator using legacy REST identity created successfully" );
@@ -478,7 +441,7 @@ public void testOperatorRESTUsingCertificateChain() throws Exception {
478
441
logTestBegin ("testOperatorRESTUsingCertificateChain" );
479
442
logger .info ("Checking if operatorForBackwardCompatibility is running, if not creating" );
480
443
if (operatorForRESTCertChain == null ) {
481
- operatorForRESTCertChain = TestUtils .createOperator (operator_chainFile , RESTCertType .CHAIN );
444
+ operatorForRESTCertChain = TestUtils .createOperator (OPERATOR_CHAIN_YAML , RESTCertType .CHAIN );
482
445
}
483
446
operatorForRESTCertChain .verifyOperatorExternalRESTEndpoint ();
484
447
logger .info ("Operator using legacy REST identity created successfully" );
@@ -499,14 +462,14 @@ public void testDomainInImageUsingWLST() throws Exception {
499
462
500
463
logger .info ("Checking if operator1 is running, if not creating" );
501
464
if (operator1 == null ) {
502
- operator1 = TestUtils .createOperator (operator1File );
465
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
503
466
}
504
467
logger .info ("Creating Domain & verifing the domain creation" );
505
468
// create domain
506
469
Domain domain = null ;
507
470
boolean testCompletedSuccessfully = false ;
508
471
try {
509
- domain = TestUtils .createDomain (domaininimagewlstFile );
472
+ domain = TestUtils .createDomain (DOMAININIMAGE_WLST_YAML );
510
473
domain .verifyDomainCreated ();
511
474
512
475
testBasicUseCases (domain );
@@ -531,14 +494,14 @@ public void testDomainInImageUsingWDT() throws Exception {
531
494
532
495
logger .info ("Checking if operator1 is running, if not creating" );
533
496
if (operator1 == null ) {
534
- operator1 = TestUtils .createOperator (operator1File );
497
+ operator1 = TestUtils .createOperator (OPERATOR1_YAML );
535
498
}
536
499
logger .info ("Creating Domain & verifing the domain creation" );
537
500
// create domain
538
501
Domain domain = null ;
539
502
boolean testCompletedSuccessfully = false ;
540
503
try {
541
- domain = TestUtils .createDomain (domaininimagewdtFile );
504
+ domain = TestUtils .createDomain (DOMAININIMAGE_WDT_YAML );
542
505
domain .verifyDomainCreated ();
543
506
544
507
testBasicUseCases (domain );
0 commit comments