@@ -73,29 +73,31 @@ public class ITMonitoringExporter extends BaseTest {
73
73
*/
74
74
@ BeforeClass
75
75
public static void staticPrepare () throws Exception {
76
- if (!QUICKTEST ) {
77
- initialize (APP_PROPS_FILE );
78
- logger .info ("Checking if operator and domain are running, if not creating" );
79
- if (operator == null ) {
80
- Map <String , Object > operatorMap = TestUtils .createOperatorMap (number , true );
81
- operator = new Operator (operatorMap , Operator .RESTCertType .SELF_SIGNED );
82
- Assert .assertNotNull (operator );
83
- operator .callHelmInstall ();
84
- }
85
- if (domain == null ) {
86
- domain = createVerifyDomain (number , operator );
87
- Assert .assertNotNull (domain );
76
+ if (!BaseTest .SHARED_CLUSTER ) {
77
+ if (!QUICKTEST ) {
78
+ initialize (APP_PROPS_FILE );
79
+ logger .info ("Checking if operator and domain are running, if not creating" );
80
+ if (operator == null ) {
81
+ Map <String , Object > operatorMap = TestUtils .createOperatorMap (number , true );
82
+ operator = new Operator (operatorMap , Operator .RESTCertType .SELF_SIGNED );
83
+ Assert .assertNotNull (operator );
84
+ operator .callHelmInstall ();
85
+ }
86
+ if (domain == null ) {
87
+ domain = createVerifyDomain (number , operator );
88
+ Assert .assertNotNull (domain );
89
+ }
90
+ myhost = domain .getHostNameForCurl ();
91
+ exporterUrl = "http://" + myhost + ":" + domain .getLoadBalancerWebPort () + "/wls-exporter/" ;
92
+ metricsUrl = exporterUrl + "metrics" ;
93
+ monitoringExporterDir = BaseTest .getResultDir () + "/monitoring" ;
94
+ resourceExporterDir =
95
+ BaseTest .getProjectRoot () + "/integration-tests/src/test/resources/exporter" ;
96
+ configPath = resourceExporterDir ;
97
+ upgradeTraefikHostName ();
98
+ deployRunMonitoringExporter (domain , operator );
99
+ buildDeployWebServiceApp (domain , TESTWSAPP , TESTWSSERVICE );
88
100
}
89
- myhost = domain .getHostNameForCurl ();
90
- exporterUrl = "http://" + myhost + ":" + domain .getLoadBalancerWebPort () + "/wls-exporter/" ;
91
- metricsUrl = exporterUrl + "metrics" ;
92
- monitoringExporterDir = BaseTest .getResultDir () + "/monitoring" ;
93
- resourceExporterDir =
94
- BaseTest .getProjectRoot () + "/integration-tests/src/test/resources/exporter" ;
95
- configPath = resourceExporterDir ;
96
- upgradeTraefikHostName ();
97
- deployRunMonitoringExporter (domain , operator );
98
- buildDeployWebServiceApp (domain , TESTWSAPP , TESTWSSERVICE );
99
101
}
100
102
}
101
103
@@ -106,19 +108,21 @@ public static void staticPrepare() throws Exception {
106
108
*/
107
109
@ AfterClass
108
110
public static void staticUnPrepare () throws Exception {
109
- if (!QUICKTEST ) {
110
- logger .info ("+++++++++++++++++++++++++++++++++---------------------------------+" );
111
- logger .info ("BEGIN" );
112
- logger .info ("Run once, release cluster lease" );
113
- if (domain != null ) {
114
- domain .destroy ();
115
- }
116
- if (operator != null ) {
117
- operator .destroy ();
111
+ if (!BaseTest .SHARED_CLUSTER ) {
112
+ if (!QUICKTEST ) {
113
+ logger .info ("+++++++++++++++++++++++++++++++++---------------------------------+" );
114
+ logger .info ("BEGIN" );
115
+ logger .info ("Run once, release cluster lease" );
116
+ if (domain != null ) {
117
+ domain .destroy ();
118
+ }
119
+ if (operator != null ) {
120
+ operator .destroy ();
121
+ }
122
+ deletePrometheusGrafana ();
123
+ tearDown (new Object () {}.getClass ().getEnclosingClass ().getSimpleName ());
124
+ logger .info ("SUCCESS" );
118
125
}
119
- deletePrometheusGrafana ();
120
- tearDown (new Object () {}.getClass ().getEnclosingClass ().getSimpleName ());
121
- logger .info ("SUCCESS" );
122
126
}
123
127
}
124
128
@@ -129,6 +133,7 @@ public static void staticUnPrepare() throws Exception {
129
133
*/
130
134
@ Test
131
135
public void test01_CheckMetricsViaPrometheus () throws Exception {
136
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
132
137
Assume .assumeFalse (QUICKTEST );
133
138
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
134
139
logTestBegin (testMethodName );
@@ -145,6 +150,7 @@ public void test01_CheckMetricsViaPrometheus() throws Exception {
145
150
*/
146
151
@ Test
147
152
public void test02_ReplaceConfiguration () throws Exception {
153
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
148
154
Assume .assumeFalse (QUICKTEST );
149
155
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
150
156
logTestBegin (testMethodName );
@@ -193,6 +199,7 @@ public void test02_ReplaceConfiguration() throws Exception {
193
199
*/
194
200
@ Test
195
201
public void test03_AppendConfiguration () throws Exception {
202
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
196
203
Assume .assumeFalse (QUICKTEST );
197
204
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
198
205
logTestBegin (testMethodName );
@@ -228,6 +235,7 @@ public void test03_AppendConfiguration() throws Exception {
228
235
*/
229
236
@ Test
230
237
public void test04_ReplaceOneAttributeValueAsArrayConfiguration () throws Exception {
238
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
231
239
Assume .assumeFalse (QUICKTEST );
232
240
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
233
241
logTestBegin (testMethodName );
@@ -252,6 +260,7 @@ public void test04_ReplaceOneAttributeValueAsArrayConfiguration() throws Excepti
252
260
@ Test
253
261
public void test05_AppendArrayWithOneExistedAndOneDifferentAttributeValueAsArrayConfiguration ()
254
262
throws Exception {
263
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
255
264
Assume .assumeFalse (QUICKTEST );
256
265
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
257
266
logTestBegin (testMethodName );
@@ -273,6 +282,7 @@ public void test05_AppendArrayWithOneExistedAndOneDifferentAttributeValueAsArray
273
282
*/
274
283
@ Test
275
284
public void test06_ReplaceWithEmptyConfiguration () throws Exception {
285
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
276
286
Assume .assumeFalse (QUICKTEST );
277
287
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
278
288
logTestBegin (testMethodName );
@@ -291,6 +301,7 @@ public void test06_ReplaceWithEmptyConfiguration() throws Exception {
291
301
*/
292
302
@ Test
293
303
public void test07_AppendWithEmptyConfiguration () throws Exception {
304
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
294
305
Assume .assumeFalse (QUICKTEST );
295
306
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
296
307
logTestBegin (testMethodName );
@@ -312,6 +323,7 @@ public void test07_AppendWithEmptyConfiguration() throws Exception {
312
323
*/
313
324
@ Test
314
325
public void test08_1AppendWithNotYmlConfiguration () throws Exception {
326
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
315
327
Assume .assumeFalse (QUICKTEST );
316
328
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
317
329
logTestBegin (testMethodName );
@@ -330,6 +342,7 @@ public void test08_1AppendWithNotYmlConfiguration() throws Exception {
330
342
*/
331
343
@ Test
332
344
public void test08_2ReplaceWithNotYmlConfiguration () throws Exception {
345
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
333
346
Assume .assumeFalse (QUICKTEST );
334
347
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
335
348
logTestBegin (testMethodName );
@@ -346,6 +359,7 @@ public void test08_2ReplaceWithNotYmlConfiguration() throws Exception {
346
359
* @throws Exception
347
360
*/
348
361
public void test09_AppendWithCorruptedYmlConfiguration () throws Exception {
362
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
349
363
Assume .assumeFalse (QUICKTEST );
350
364
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
351
365
logTestBegin (testMethodName );
@@ -366,6 +380,7 @@ public void test09_AppendWithCorruptedYmlConfiguration() throws Exception {
366
380
*/
367
381
@ Test
368
382
public void test10_ReplaceWithCorruptedYmlConfiguration () throws Exception {
383
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
369
384
Assume .assumeFalse (QUICKTEST );
370
385
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
371
386
logTestBegin (testMethodName );
@@ -386,6 +401,7 @@ public void test10_ReplaceWithCorruptedYmlConfiguration() throws Exception {
386
401
*/
387
402
@ Test
388
403
public void test11_ReplaceWithDublicatedValuesConfiguration () throws Exception {
404
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
389
405
Assume .assumeFalse (QUICKTEST );
390
406
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
391
407
logTestBegin (testMethodName );
@@ -406,6 +422,7 @@ public void test11_ReplaceWithDublicatedValuesConfiguration() throws Exception {
406
422
*/
407
423
@ Test
408
424
public void test12_AppendWithDublicatedValuesConfiguration () throws Exception {
425
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
409
426
Assume .assumeFalse (QUICKTEST );
410
427
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
411
428
logTestBegin (testMethodName );
@@ -427,6 +444,7 @@ public void test12_AppendWithDublicatedValuesConfiguration() throws Exception {
427
444
*/
428
445
@ Test
429
446
public void test13_ReplaceMetricsNameSnakeCaseFalseConfiguration () throws Exception {
447
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
430
448
Assume .assumeFalse (QUICKTEST );
431
449
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
432
450
logTestBegin (testMethodName );
@@ -453,6 +471,7 @@ public void test13_ReplaceMetricsNameSnakeCaseFalseConfiguration() throws Except
453
471
// verify that change configuration fails without authentication
454
472
@ Test
455
473
public void test14_ChangeConfigNoCredentials () throws Exception {
474
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
456
475
Assume .assumeFalse (QUICKTEST );
457
476
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
458
477
logTestBegin (testMethodName );
@@ -478,6 +497,7 @@ public void test14_ChangeConfigNoCredentials() throws Exception {
478
497
*/
479
498
@ Test
480
499
public void test15_ChangeConfigInvalidUser () throws Exception {
500
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
481
501
Assume .assumeFalse (QUICKTEST );
482
502
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
483
503
logTestBegin (testMethodName );
@@ -499,6 +519,7 @@ public void test15_ChangeConfigInvalidUser() throws Exception {
499
519
*/
500
520
@ Test
501
521
public void test16_ChangeConfigInvalidPass () throws Exception {
522
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
502
523
Assume .assumeFalse (QUICKTEST );
503
524
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
504
525
logTestBegin (testMethodName );
@@ -518,6 +539,7 @@ public void test16_ChangeConfigInvalidPass() throws Exception {
518
539
*/
519
540
@ Test
520
541
public void test17_ChangeConfigEmptyUser () throws Exception {
542
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
521
543
Assume .assumeFalse (QUICKTEST );
522
544
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
523
545
logTestBegin (testMethodName );
@@ -539,6 +561,7 @@ public void test17_ChangeConfigEmptyUser() throws Exception {
539
561
*/
540
562
@ Test
541
563
public void test18_ChangeConfigEmptyPass () throws Exception {
564
+ Assume .assumeFalse (BaseTest .SHARED_CLUSTER );
542
565
Assume .assumeFalse (QUICKTEST );
543
566
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
544
567
logTestBegin (testMethodName );
0 commit comments