1
1
// Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at
3
3
// http://oss.oracle.com/licenses/upl.
4
-
5
4
package oracle .kubernetes .operator ;
6
5
7
6
import java .io .IOException ;
18
17
import oracle .kubernetes .operator .utils .ExecResult ;
19
18
import oracle .kubernetes .operator .utils .Operator ;
20
19
import oracle .kubernetes .operator .utils .TestUtils ;
21
- import org .junit .AfterClass ;
22
20
import org .junit .Assert ;
23
21
import org .junit .Assume ;
24
- import org .junit .BeforeClass ;
25
- import org .junit .Test ;
26
22
27
23
/** JUnit test class used for testing configuration override use cases. */
28
- public class ItSitConfig extends BaseTest {
24
+ public class SitConfig extends BaseTest {
29
25
30
26
private static final String DOMAINUID = "customsitconfigdomain" ;
31
27
private static final String ADMINPORT = "30710" ;
@@ -56,13 +52,7 @@ public class ItSitConfig extends BaseTest {
56
52
* @throws Exception when the initialization, creating directories , copying files and domain
57
53
* creation fails.
58
54
*/
59
- @ BeforeClass
60
- public static void staticPrepare () throws Exception {
61
- prepare (
62
- "integration-tests/src/test/resources/sitconfig/scripts/create-domain-auto-custom-sit-config20.py" );
63
- }
64
-
65
- public static void prepare (String domainScript ) throws Exception {
55
+ protected static void staticPrepare (String domainScript ) throws Exception {
66
56
// initialize test properties and create the directories
67
57
if (!QUICKTEST ) {
68
58
// initialize test properties and create the directories
@@ -125,8 +115,7 @@ public static void prepare(String domainScript) throws Exception {
125
115
*
126
116
* @throws Exception when domain destruction or MySQL container destruction fails
127
117
*/
128
- @ AfterClass
129
- public static void staticUnPrepare () throws Exception {
118
+ protected static void staticUnPrepare () throws Exception {
130
119
if (!QUICKTEST ) {
131
120
ExecResult result = TestUtils .exec ("kubectl delete -f " + mysqlYamlFile );
132
121
destroySitConfigDomain ();
@@ -142,7 +131,7 @@ public static void staticUnPrepare() throws Exception {
142
131
* @return - created domain
143
132
* @throws Exception - if it cannot create the domain
144
133
*/
145
- protected static Domain createSitConfigDomain (String domainScript ) throws Exception {
134
+ private static Domain createSitConfigDomain (String domainScript ) throws Exception {
146
135
// load input yaml to map and add configOverrides
147
136
Map <String , Object > domainMap = TestUtils .loadYaml (DOMAININIMAGE_WLST_YAML );
148
137
domainMap .put ("configOverrides" , "sitconfigcm" );
@@ -224,8 +213,7 @@ private static void copyMySqlFile() throws IOException {
224
213
*
225
214
* @throws Exception when the assertion fails due to unmatched values
226
215
*/
227
- @ Test
228
- public void testCustomSitConfigOverridesForDomain () throws Exception {
216
+ protected void testCustomSitConfigOverridesForDomain () throws Exception {
229
217
Assume .assumeFalse (QUICKTEST );
230
218
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
231
219
logTestBegin (testMethod );
@@ -253,8 +241,7 @@ public void testCustomSitConfigOverridesForDomain() throws Exception {
253
241
*
254
242
* @throws Exception when the assertion fails due to unmatched values
255
243
*/
256
- @ Test
257
- public void testCustomSitConfigOverridesForDomainMS () throws Exception {
244
+ protected void testCustomSitConfigOverridesForDomainMS () throws Exception {
258
245
Assume .assumeFalse (QUICKTEST );
259
246
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
260
247
logTestBegin (testMethod );
@@ -287,8 +274,7 @@ public void testCustomSitConfigOverridesForDomainMS() throws Exception {
287
274
*
288
275
* @throws Exception when the assertion fails due to unmatched values
289
276
*/
290
- @ Test
291
- public void testCustomSitConfigOverridesForJdbc () throws Exception {
277
+ protected void testCustomSitConfigOverridesForJdbc () throws Exception {
292
278
Assume .assumeFalse (QUICKTEST );
293
279
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
294
280
logTestBegin (testMethod );
@@ -319,8 +305,7 @@ public void testCustomSitConfigOverridesForJdbc() throws Exception {
319
305
*
320
306
* @throws Exception when the assertion fails due to unmatched values
321
307
*/
322
- @ Test
323
- public void testCustomSitConfigOverridesForJms () throws Exception {
308
+ protected void testCustomSitConfigOverridesForJms () throws Exception {
324
309
Assume .assumeFalse (QUICKTEST );
325
310
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
326
311
logTestBegin (testMethod );
@@ -351,8 +336,7 @@ public void testCustomSitConfigOverridesForJms() throws Exception {
351
336
*
352
337
* @throws Exception when the assertion fails due to unmatched values
353
338
*/
354
- @ Test
355
- public void testCustomSitConfigOverridesForWldf () throws Exception {
339
+ protected void testCustomSitConfigOverridesForWldf () throws Exception {
356
340
Assume .assumeFalse (QUICKTEST );
357
341
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
358
342
logTestBegin (testMethod );
@@ -378,8 +362,7 @@ public void testCustomSitConfigOverridesForWldf() throws Exception {
378
362
*
379
363
* @throws Exception when assertions fail.
380
364
*/
381
- @ Test
382
- public void testConfigOverrideAfterDomainStartup () throws Exception {
365
+ protected void testConfigOverrideAfterDomainStartup () throws Exception {
383
366
Assume .assumeFalse (QUICKTEST );
384
367
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
385
368
logTestBegin (testMethod );
@@ -413,8 +396,7 @@ public void testConfigOverrideAfterDomainStartup() throws Exception {
413
396
*
414
397
* @throws Exception when assertions fail.
415
398
*/
416
- @ Test
417
- public void testOverrideJdbcResourceAfterDomainStart () throws Exception {
399
+ protected void testOverrideJdbcResourceAfterDomainStart () throws Exception {
418
400
Assume .assumeFalse (QUICKTEST );
419
401
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
420
402
logTestBegin (testMethod );
@@ -448,8 +430,7 @@ public void testOverrideJdbcResourceAfterDomainStart() throws Exception {
448
430
*
449
431
* @throws Exception when assertions fail.
450
432
*/
451
- @ Test
452
- public void testOverrideJdbcResourceWithNewSecret () throws Exception {
433
+ protected void testOverrideJdbcResourceWithNewSecret () throws Exception {
453
434
Assume .assumeFalse (QUICKTEST );
454
435
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
455
436
logTestBegin (testMethod );
0 commit comments