28
28
import org .junit .jupiter .api .BeforeAll ;
29
29
import org .junit .jupiter .api .DisplayName ;
30
30
import org .junit .jupiter .api .MethodOrderer ;
31
+ import org .junit .jupiter .api .Order ;
31
32
import org .junit .jupiter .api .Tag ;
32
33
import org .junit .jupiter .api .Test ;
33
34
import org .junit .jupiter .api .TestInfo ;
38
39
import static org .junit .jupiter .api .Assumptions .assumeTrue ;
39
40
40
41
@ IntegrationTest
41
- @ TestMethodOrder (MethodOrderer .MethodName .class )
42
+ @ TestMethodOrder (MethodOrderer .OrderAnnotation .class )
42
43
public class ITWdt extends BaseTest {
43
44
@ TestingLogger
44
45
private static final Logger logger = Logger .getLogger ("integration.tests" );
@@ -105,6 +106,7 @@ private static PrintWriter getTestMethodWriter(TestInfo testInfo) throws IOExcep
105
106
* @throws Exception - if any error occurs
106
107
*/
107
108
@ DisplayName ("Test 1: createDomain bad arguments" )
109
+ @ Order (1 )
108
110
@ Tag ("gate" )
109
111
@ Test
110
112
public void test1CreateDomainNoDomainHome (TestInfo testInfo ) throws Exception {
@@ -121,6 +123,7 @@ public void test1CreateDomainNoDomainHome(TestInfo testInfo) throws Exception {
121
123
* @throws Exception - if any error occurs
122
124
*/
123
125
@ DisplayName ("Test 2: createDomain bad arguments" )
126
+ @ Order (2 )
124
127
@ Tag ("gate" )
125
128
@ Test
126
129
public void test2CreateDomainNoDomainHome (TestInfo testInfo ) throws Exception {
@@ -138,6 +141,7 @@ public void test2CreateDomainNoDomainHome(TestInfo testInfo) throws Exception {
138
141
* @throws Exception - if any error occurs
139
142
*/
140
143
@ DisplayName ("Test 3: createDomain bad arguments" )
144
+ @ Order (3 )
141
145
@ Tag ("gate" )
142
146
@ Test
143
147
public void test3CreateDomainNoModelfile (TestInfo testInfo ) throws Exception {
@@ -155,6 +159,7 @@ public void test3CreateDomainNoModelfile(TestInfo testInfo) throws Exception {
155
159
* @throws Exception - if output file could not be created or written
156
160
*/
157
161
@ DisplayName ("Test 4: createDomain without archive file" )
162
+ @ Order (4 )
158
163
@ Tag ("gate" )
159
164
@ Test
160
165
public void test4CreateDomainNoArchivefile (TestInfo testInfo ) throws Exception {
@@ -173,6 +178,7 @@ public void test4CreateDomainNoArchivefile(TestInfo testInfo) throws Exception {
173
178
* @throws Exception - if any error occurs
174
179
*/
175
180
@ DisplayName ("Test 5: createDomain with domain_parent" )
181
+ @ Order (5 )
176
182
@ Tag ("gate" )
177
183
@ Test
178
184
public void test5CreateDomain (TestInfo testInfo ) throws Exception {
@@ -193,6 +199,7 @@ public void test5CreateDomain(TestInfo testInfo) throws Exception {
193
199
* @throws Exception - if any error occurs
194
200
*/
195
201
@ DisplayName ("Test 6: createDomain with domain_home" )
202
+ @ Order (6 )
196
203
@ Tag ("gate" )
197
204
@ Test
198
205
public void test6CreateDomainDifferentDomainName (TestInfo testInfo ) throws Exception {
@@ -212,6 +219,7 @@ public void test6CreateDomainDifferentDomainName(TestInfo testInfo) throws Excep
212
219
* test createDomain.sh with WLS domain_type
213
220
* @throws Exception -if any error occurs
214
221
*/
222
+ @ Order (7 )
215
223
@ Tag ("gate" )
216
224
@ Test
217
225
public void test7CreateDomainWLSType (TestInfo testInfo ) throws Exception {
@@ -231,6 +239,7 @@ public void test7CreateDomainWLSType(TestInfo testInfo) throws Exception {
231
239
* @throws Exception - if any error occurs
232
240
*/
233
241
@ DisplayName ("Test 8: createDomain but needs variable file" )
242
+ @ Order (8 )
234
243
@ Tag ("gate" )
235
244
@ Test
236
245
public void test8CreateDomainNoVariableFile (TestInfo testInfo ) throws Exception {
@@ -250,6 +259,7 @@ public void test8CreateDomainNoVariableFile(TestInfo testInfo) throws Exception
250
259
* @throws Exception - if any error occurs
251
260
*/
252
261
@ DisplayName ("Test 9: createDomain with variable file" )
262
+ @ Order (9 )
253
263
@ Tag ("gate" )
254
264
@ Test
255
265
public void test9CreateDomainWithVariableFile (TestInfo testInfo ) throws Exception {
@@ -269,9 +279,10 @@ public void test9CreateDomainWithVariableFile(TestInfo testInfo) throws Exceptio
269
279
* @throws Exception - if any error occurs
270
280
*/
271
281
@ DisplayName ("Test 10: createDomain with WLS wlst_path" )
282
+ @ Order (10 )
272
283
@ Tag ("gate" )
273
284
@ Test
274
- public void testACreateDomainWithWlstPath (TestInfo testInfo ) throws Exception {
285
+ public void test10CreateDomainWithWlstPath (TestInfo testInfo ) throws Exception {
275
286
String cmd = createDomainScript + " -oracle_home " + mwhome_12213 + " -domain_home " +
276
287
domainParentDir + FS + "domain2 -model_file " +
277
288
getSampleModelFile ("1" ) + " -archive_file " + getSampleArchiveFile () +
@@ -289,9 +300,10 @@ public void testACreateDomainWithWlstPath(TestInfo testInfo) throws Exception {
289
300
* @throws Exception - if any error occurs
290
301
*/
291
302
@ DisplayName ("Test 11: createDomain with oracle_commmon wlst_path" )
303
+ @ Order (11 )
292
304
@ Tag ("gate" )
293
305
@ Test
294
- public void testBCreateDomainWithOracleCommonWlstPath (TestInfo testInfo ) throws Exception {
306
+ public void test11CreateDomainWithOracleCommonWlstPath (TestInfo testInfo ) throws Exception {
295
307
String cmd = createDomainScript + " -oracle_home " + mwhome_12213 + " -domain_home " +
296
308
domainParentDir + FS + "domain2 -model_file " +
297
309
getSampleModelFile ("1" ) + " -archive_file " + getSampleArchiveFile () +
@@ -309,9 +321,10 @@ public void testBCreateDomainWithOracleCommonWlstPath(TestInfo testInfo) throws
309
321
* @throws Exception - if any error occurs
310
322
*/
311
323
@ DisplayName ("Test 12: createDomain JRF domain without DB" )
324
+ @ Order (12 )
312
325
@ Tag ("gate" )
313
326
@ Test
314
- public void testCCreateJRFDomainNoRunRCU (TestInfo testInfo ) throws Exception {
327
+ public void test12CreateJRFDomainNoRunRCU (TestInfo testInfo ) throws Exception {
315
328
try (PrintWriter out = getTestMethodWriter (testInfo )) {
316
329
Path source = Paths .get (getSampleModelFile ("2" ));
317
330
Path modelOut = getTestOutputPath (testInfo ).resolve (SAMPLE_MODEL_FILE_PREFIX + "2.yaml" );
@@ -333,9 +346,10 @@ public void testCCreateJRFDomainNoRunRCU(TestInfo testInfo) throws Exception {
333
346
* @throws Exception - if any error occurs
334
347
*/
335
348
@ DisplayName ("Test 13: createDomain JRF domain and run RCU" )
349
+ @ Order (13 )
336
350
@ Tag ("gate" )
337
351
@ Test
338
- public void testDCreateJRFDomainRunRCU (TestInfo testInfo ) throws Exception {
352
+ public void test13CreateJRFDomainRunRCU (TestInfo testInfo ) throws Exception {
339
353
waitForDatabase ();
340
354
try (PrintWriter out = getTestMethodWriter (testInfo )) {
341
355
Path source = Paths .get (getSampleModelFile ("2" ));
@@ -361,9 +375,10 @@ public void testDCreateJRFDomainRunRCU(TestInfo testInfo) throws Exception {
361
375
* @throws Exception - if any error occurs
362
376
*/
363
377
@ DisplayName ("Test 14: Update JRF domain that requires restart" )
378
+ @ Order (14 )
364
379
@ Tag ("gate" )
365
380
@ Test
366
- public void testDOnlineUpdate1 (TestInfo testInfo ) throws Exception {
381
+ public void test14OnlineUpdate1 (TestInfo testInfo ) throws Exception {
367
382
assumeTrue (rcuDomainCreated , "testDOnlineUpdate skipped because testDCreateJRFDomainRunRCU failed" );
368
383
369
384
// Setup boot.properties
@@ -405,9 +420,10 @@ public void testDOnlineUpdate1(TestInfo testInfo) throws Exception {
405
420
* @throws Exception - if any error occurs
406
421
*/
407
422
@ DisplayName ("Test 15: Update JRF domain that requires restart, but cancel changes" )
423
+ @ Order (15 )
408
424
@ Tag ("gate" )
409
425
@ Test
410
- public void testDOnlineUpdate2 (TestInfo testInfo ) throws Exception {
426
+ public void test15OnlineUpdate2 (TestInfo testInfo ) throws Exception {
411
427
assumeTrue (rcuDomainCreated , "testDOnlineUpdate2 skipped because testDCreateJRFDomainRunRCU failed" );
412
428
413
429
String domainHome = domainParentDir + FS + "jrfDomain1" ;
@@ -445,9 +461,10 @@ public void testDOnlineUpdate2(TestInfo testInfo) throws Exception {
445
461
* @throws Exception - if any error occurs
446
462
*/
447
463
@ DisplayName ("Test 16: create restricted JRF domain" )
464
+ @ Order (16 )
448
465
@ Tag ("gate" )
449
466
@ Test
450
- public void testECreateRestrictedJRFDomain (TestInfo testInfo ) throws Exception {
467
+ public void test16CreateRestrictedJRFDomain (TestInfo testInfo ) throws Exception {
451
468
String cmd = createDomainScript + " -oracle_home " + mwhome_12213 + " -domain_home " +
452
469
domainParentDir + FS + "restrictedJRFD1 -model_file " +
453
470
getSampleModelFile ("-constant" ) + " -archive_file " + getSampleArchiveFile () +
@@ -465,9 +482,10 @@ public void testECreateRestrictedJRFDomain(TestInfo testInfo) throws Exception {
465
482
* @throws Exception - if any error occurs
466
483
*/
467
484
@ DisplayName ("Test 17: Discover domain restrictedJRFD1" )
485
+ @ Order (17 )
468
486
@ Tag ("gate" )
469
487
@ Test
470
- public void testFDiscoverDomainWithRequiredArgument (TestInfo testInfo ) throws Exception {
488
+ public void test17DiscoverDomainWithRequiredArgument (TestInfo testInfo ) throws Exception {
471
489
try (PrintWriter out = getTestMethodWriter (testInfo )) {
472
490
Path discoveredArchive = getTestOutputPath (testInfo ).resolve ("discoveredArchive.zip" );
473
491
String cmd = discoverDomainScript
@@ -507,9 +525,10 @@ private void verifyFDiscoverDomainWithRequiredArgument(String expectedModelFile)
507
525
* @throws Exception - if any error occurs
508
526
*/
509
527
@ DisplayName ("Test 18: Discover domain restrictedJRFD1 using model_file arg" )
528
+ @ Order (18 )
510
529
@ Tag ("gate" )
511
530
@ Test
512
- public void testGDiscoverDomainWithModelFile (TestInfo testInfo ) throws Exception {
531
+ public void test18DiscoverDomainWithModelFile (TestInfo testInfo ) throws Exception {
513
532
Path discoveredArchive = getTestOutputPath (testInfo ).resolve ("discoveredArchive.zip" );
514
533
Path discoveredModelFile = getTestOutputPath (testInfo ).resolve ("discoveredRestrictedJRFD1.yaml" );
515
534
String cmd = discoverDomainScript + " -oracle_home " + mwhome_12213 + " -domain_home " +
@@ -530,9 +549,10 @@ public void testGDiscoverDomainWithModelFile(TestInfo testInfo) throws Exception
530
549
* @throws Exception - if any error occurs
531
550
*/
532
551
@ DisplayName ("Test 19: Discover domain restrictedJRFD1 using variable file" )
552
+ @ Order (19 )
533
553
@ Tag ("gate" )
534
554
@ Test
535
- public void testGDiscoverDomainWithVariableFile (TestInfo testInfo ) throws Exception {
555
+ public void test19DiscoverDomainWithVariableFile (TestInfo testInfo ) throws Exception {
536
556
Path discoveredArchive = getTestOutputPath (testInfo ).resolve ("discoveredArchive.zip" );
537
557
Path discoveredModelFile = getTestOutputPath (testInfo ).resolve ("discoveredRestrictedJRFD1.yaml" );
538
558
Path discoveredVariableFile = getTestOutputPath (testInfo ).resolve ("discoveredRestrictedJRFD1.properties" );
@@ -566,10 +586,13 @@ private void verifyGDiscoverDomainWithVariableFile(String expectedModelFile) thr
566
586
* @throws Exception - if any error occurs
567
587
*/
568
588
@ DisplayName ("Test 20: Discover domain domain_type JRF" )
589
+ @ Order (20 )
569
590
@ Tag ("gate" )
570
591
@ Test
571
- public void testHDiscoverDomainJRFDomainType (TestInfo testInfo ) throws Exception {
572
- try (PrintWriter out = getTestMethodWriter (testInfo )) {
592
+ public void test20DiscoverDomainJRFDomainType (TestInfo testInfo ) throws Exception {
593
+ assumeTrue (rcuDomainCreated , "testHDiscoverDomainJRFDomainType skipped because testDCreateJRFDomainRunRCU failed" );
594
+
595
+ try (PrintWriter out = getTestMethodWriter (testInfo )) {
573
596
Path discoveredArchive = getTestOutputPath (testInfo ).resolve ("discoveredArchive.zip" );
574
597
Path discoveredModelFile = getTestOutputPath (testInfo ).resolve ("discoveredJRFD1.yaml" );
575
598
String cmd = discoverDomainScript
@@ -605,9 +628,10 @@ private void verifyHDiscoverDomainJRFDomainType(String expectedModelFile) {
605
628
* @throws Exception - if any error occurs
606
629
*/
607
630
@ DisplayName ("Test 21: Update domain dynamic server count" )
631
+ @ Order (21 )
608
632
@ Tag ("gate" )
609
633
@ Test
610
- public void testIUpdateDomain (TestInfo testInfo ) throws Exception {
634
+ public void test21UpdateDomain (TestInfo testInfo ) throws Exception {
611
635
try (PrintWriter out = getTestMethodWriter (testInfo )) {
612
636
Path source = Paths .get (getSampleVariableFile ());
613
637
Path variableFile = getTestOutputPath (testInfo ).resolve (SAMPLE_VARIABLE_FILE );
@@ -640,9 +664,10 @@ public void testIUpdateDomain(TestInfo testInfo) throws Exception {
640
664
* @throws Exception - if any error occurs
641
665
*/
642
666
@ DisplayName ("Test 22: Deploy App negative test" )
667
+ @ Order (22 )
643
668
@ Tag ("gate" )
644
669
@ Test
645
- public void testJDeployAppWithoutModelfile (TestInfo testInfo ) throws Exception {
670
+ public void test22DeployAppWithoutModelfile (TestInfo testInfo ) throws Exception {
646
671
try (PrintWriter out = getTestMethodWriter (testInfo )) {
647
672
String cmd = deployAppScript
648
673
+ " -oracle_home " + mwhome_12213
@@ -657,10 +682,11 @@ public void testJDeployAppWithoutModelfile(TestInfo testInfo) throws Exception {
657
682
* Test deployApps.
658
683
* @throws Exception - if any error occurs
659
684
*/
660
- @ DisplayName ("Test 22: Deploy App" )
685
+ @ DisplayName ("Test 23: Deploy App" )
686
+ @ Order (23 )
661
687
@ Tag ("gate" )
662
688
@ Test
663
- public void testKDeployAppWithModelfile (TestInfo testInfo ) throws Exception {
689
+ public void test23DeployAppWithModelfile (TestInfo testInfo ) throws Exception {
664
690
try (PrintWriter out = getTestMethodWriter (testInfo )) {
665
691
String cmd = deployAppScript
666
692
+ " -oracle_home " + mwhome_12213
@@ -676,10 +702,11 @@ public void testKDeployAppWithModelfile(TestInfo testInfo) throws Exception {
676
702
* test validateModel.sh with -oracle_home only
677
703
* @throws Exception - if any error occurs
678
704
*/
679
- @ DisplayName ("Test 23: Validate model negative (no model)" )
705
+ @ DisplayName ("Test 24: Validate model negative (no model)" )
706
+ @ Order (24 )
680
707
@ Tag ("gate" )
681
708
@ Test
682
- public void testLValidateModelWithOracleHomeOnly (TestInfo testInfo ) throws Exception {
709
+ public void test24ValidateModelWithOracleHomeOnly (TestInfo testInfo ) throws Exception {
683
710
try (PrintWriter out = getTestMethodWriter (testInfo )) {
684
711
String cmd = validateModelScript + " -oracle_home " + mwhome_12213 ;
685
712
CommandResult result = Runner .run (cmd , getTestMethodEnvironment (testInfo ), out );
@@ -691,10 +718,11 @@ public void testLValidateModelWithOracleHomeOnly(TestInfo testInfo) throws Excep
691
718
* test validateModel.sh with -oracle_home and -model_file
692
719
* @throws Exception - if any error occurs
693
720
*/
694
- @ DisplayName ("Test 24: Validate model negative (no archive)" )
721
+ @ DisplayName ("Test 25: Validate model negative (no archive)" )
722
+ @ Order (25 )
695
723
@ Tag ("gate" )
696
724
@ Test
697
- public void testMValidateModelWithOracleHomeModelFile (TestInfo testInfo ) throws Exception {
725
+ public void test25ValidateModelWithOracleHomeModelFile (TestInfo testInfo ) throws Exception {
698
726
try (PrintWriter out = getTestMethodWriter (testInfo )) {
699
727
String cmd = validateModelScript + " -oracle_home " + mwhome_12213 + " -model_file " +
700
728
getSampleModelFile ("-constant" );
@@ -707,10 +735,11 @@ public void testMValidateModelWithOracleHomeModelFile(TestInfo testInfo) throws
707
735
* test validateModel.sh without -variable_file
708
736
* @throws Exception - if any error occurs
709
737
*/
710
- @ DisplayName ("Test 25: Validate model negative (no variable file)" )
738
+ @ DisplayName ("Test 26: Validate model negative (no variable file)" )
739
+ @ Order (26 )
711
740
@ Tag ("gate" )
712
741
@ Test
713
- public void testNValidateModelWithoutVariableFile (TestInfo testInfo ) throws Exception {
742
+ public void test26ValidateModelWithoutVariableFile (TestInfo testInfo ) throws Exception {
714
743
try (PrintWriter out = getTestMethodWriter (testInfo )) {
715
744
String cmd = validateModelScript
716
745
+ " -oracle_home " + mwhome_12213
@@ -724,10 +753,11 @@ public void testNValidateModelWithoutVariableFile(TestInfo testInfo) throws Exce
724
753
* test compareModel.sh with only attribute difference. The files existences test whether it impacts WKO operation
725
754
* @throws Exception - if any error occurs
726
755
*/
727
- @ DisplayName ("Test 26: Compare model" )
756
+ @ DisplayName ("Test 27: Compare model" )
757
+ @ Order (27 )
728
758
@ Tag ("gate" )
729
759
@ Test
730
- public void testCompareModelRemoveAttribute (TestInfo testInfo ) throws Exception {
760
+ public void test27CompareModelRemoveAttribute (TestInfo testInfo ) throws Exception {
731
761
try (PrintWriter out = getTestMethodWriter (testInfo )) {
732
762
Path outputDir = getTestOutputPath (testInfo ).resolve ("wdt_temp_output" );
733
763
Files .createDirectories (outputDir );
@@ -748,10 +778,11 @@ public void testCompareModelRemoveAttribute(TestInfo testInfo) throws Exception
748
778
* test validateModel.sh with invalid model file
749
779
* @throws Exception - if any error occurs
750
780
*/
751
- @ DisplayName ("Test 27: Validate model negative (invalid model)" )
781
+ @ DisplayName ("Test 28: Validate model negative (invalid model)" )
782
+ @ Order (28 )
752
783
@ Tag ("gate" )
753
784
@ Test
754
- public void testOValidateModelWithInvalidModelfile (TestInfo testInfo ) throws Exception {
785
+ public void test28ValidateModelWithInvalidModelfile (TestInfo testInfo ) throws Exception {
755
786
try (PrintWriter out = getTestMethodWriter (testInfo )) {
756
787
String cmd = validateModelScript
757
788
+ " -oracle_home " + mwhome_12213
@@ -762,10 +793,11 @@ public void testOValidateModelWithInvalidModelfile(TestInfo testInfo) throws Exc
762
793
}
763
794
}
764
795
765
- @ DisplayName ("Test 28: Encrypt model" )
796
+ @ DisplayName ("Test 29: Encrypt model" )
797
+ @ Order (29 )
766
798
@ Tag ("gate" )
767
799
@ Test
768
- public void testPEncryptModel (TestInfo testInfo ) throws Exception {
800
+ public void test29EncryptModel (TestInfo testInfo ) throws Exception {
769
801
try (PrintWriter out = getTestMethodWriter (testInfo )) {
770
802
Path source = Paths .get (getSampleModelFile ("-constant" ));
771
803
Path model = getTestOutputPath (testInfo ).resolve (SAMPLE_MODEL_FILE_PREFIX + "-constant.yaml" );
@@ -851,7 +883,7 @@ private void setUpBootProperties(String domainHome, String server, String userna
851
883
throws Exception {
852
884
853
885
File adminSecurityDir = new File (domainHome + FS + "servers" + FS + server + FS + "security" );
854
- adminSecurityDir .mkdirs ();
886
+ assertTrue ( adminSecurityDir .mkdirs (), "mkdir for boot.properties failed" );
855
887
try (PrintWriter pw = new PrintWriter (adminSecurityDir + FS + "boot.properties" )) {
856
888
pw .println ("username=" + username );
857
889
pw .println ("password=" + password );
0 commit comments