@@ -54,6 +54,20 @@ public class ITOperator extends BaseTest {
54
54
private static Operator operatorForDel1 ;
55
55
private static Operator operatorForDel2 ;
56
56
57
+ private static boolean QUICKTEST ;
58
+ private static boolean SMOKETEST ;
59
+
60
+ // Set QUICKTEST env var to true to run a small subset of tests.
61
+ // Set SMOKETEST env var to true to run an even smaller subset
62
+ // of tests, plus leave domain1 up and running when the test completes.
63
+ static {
64
+ QUICKTEST =
65
+ System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" );
66
+ SMOKETEST =
67
+ System .getenv ("SMOKETEST" ) != null && System .getenv ("SMOKETEST" ).equalsIgnoreCase ("true" );
68
+ if (SMOKETEST ) QUICKTEST = true ;
69
+ }
70
+
57
71
/**
58
72
* This method gets called only once before any of the test methods are executed. It does the
59
73
* initialization of the integration test properties defined in OperatorIT.properties and setting
@@ -103,16 +117,15 @@ public void test1CreateFirstOperatorAndDomain() throws Exception {
103
117
logTestBegin ("test1CreateFirstOperatorAndDomain" );
104
118
testCreateOperatorManagingDefaultAndTest1NS ();
105
119
Domain domain1 = testAllUseCasesForADomain (operator1 , domain1YamlFile );
106
- domain1 .testWlsLivenessProbe ();
107
- domain1 .shutdownUsingServerStartPolicy ();
120
+ if (! SMOKETEST ) domain1 .testWlsLivenessProbe ();
121
+ if (! SMOKETEST ) domain1 .shutdownUsingServerStartPolicy ();
108
122
109
123
logger .info ("SUCCESS - test1CreateFirstOperatorAndDomain" );
110
124
}
111
125
112
126
@ Test
113
127
public void test2CreateAnotherDomainInDefaultNS () throws Exception {
114
- Assume .assumeFalse (
115
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
128
+ Assume .assumeFalse (QUICKTEST );
116
129
117
130
logTestBegin ("test2CreateAnotherDomainInDefaultNS" );
118
131
logger .info ("Creating Domain domain2 & verifing the domain creation" );
@@ -129,8 +142,7 @@ public void test2CreateAnotherDomainInDefaultNS() throws Exception {
129
142
130
143
@ Test
131
144
public void test3CreateDomainInTest1NS () throws Exception {
132
- Assume .assumeFalse (
133
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
145
+ Assume .assumeFalse (QUICKTEST );
134
146
135
147
logTestBegin ("test3CreateDomainInTest1NS" );
136
148
logger .info ("Creating Domain domain3 & verifing the domain creation" );
@@ -146,8 +158,7 @@ public void test3CreateDomainInTest1NS() throws Exception {
146
158
147
159
@ Test
148
160
public void test4CreateAnotherOperatorManagingTest2NS () throws Exception {
149
- Assume .assumeFalse (
150
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
161
+ Assume .assumeFalse (QUICKTEST );
151
162
152
163
logTestBegin ("test4CreateAnotherOperatorManagingTest2NS" );
153
164
logger .info ("Creating Operator & waiting for the script to complete execution" );
@@ -158,8 +169,7 @@ public void test4CreateAnotherOperatorManagingTest2NS() throws Exception {
158
169
159
170
@ Test
160
171
public void test5CreateConfiguredDomainInTest2NS () throws Exception {
161
- Assume .assumeFalse (
162
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
172
+ Assume .assumeFalse (QUICKTEST );
163
173
164
174
logTestBegin ("test5CreateConfiguredDomainInTest2NS" );
165
175
logger .info ("Creating Domain domain4 & verifing the domain creation" );
@@ -198,8 +208,7 @@ public void test5CreateConfiguredDomainInTest2NS() throws Exception {
198
208
199
209
@ Test
200
210
public void test6CreateDomainWithStartPolicyAdminOnly () throws Exception {
201
- Assume .assumeFalse (
202
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
211
+ Assume .assumeFalse (QUICKTEST );
203
212
204
213
logTestBegin ("test6CreateDomainWithStartPolicyAdminOnly" );
205
214
logger .info ("Checking if operator1 is running, if not creating" );
@@ -215,8 +224,7 @@ public void test6CreateDomainWithStartPolicyAdminOnly() throws Exception {
215
224
216
225
@ Test
217
226
public void test7CreateDomainPVReclaimPolicyRecycle () throws Exception {
218
- Assume .assumeFalse (
219
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
227
+ Assume .assumeFalse (QUICKTEST );
220
228
221
229
logTestBegin ("test7CreateDomainPVReclaimPolicyRecycle" );
222
230
logger .info ("Checking if operator1 is running, if not creating" );
@@ -233,8 +241,7 @@ public void test7CreateDomainPVReclaimPolicyRecycle() throws Exception {
233
241
234
242
@ Test
235
243
public void test8CreateDomainOnExistingDir () throws Exception {
236
- Assume .assumeFalse (
237
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
244
+ Assume .assumeFalse (QUICKTEST );
238
245
239
246
logTestBegin ("test8CreateDomainOnExistingDir" );
240
247
if (operator1 == null ) {
@@ -251,8 +258,8 @@ public void test8CreateDomainOnExistingDir() throws Exception {
251
258
252
259
// @Test
253
260
public void testACreateDomainApacheLB () throws Exception {
254
- Assume .assumeFalse (
255
- System . getenv ( "QUICKTEST" ) != null && System . getenv ( "QUICKTEST" ). equalsIgnoreCase ( "true" ));
261
+ Assume .assumeFalse (QUICKTEST );
262
+
256
263
logTestBegin ("testACreateDomainApacheLB" );
257
264
logger .info ("Creating Domain domain9 & verifing the domain creation" );
258
265
if (operator1 == null ) {
@@ -268,8 +275,8 @@ public void testACreateDomainApacheLB() throws Exception {
268
275
269
276
@ Test
270
277
public void testBCreateDomainWithDefaultValuesInSampleInputs () throws Exception {
271
- Assume .assumeFalse (
272
- System . getenv ( "QUICKTEST" ) != null && System . getenv ( "QUICKTEST" ). equalsIgnoreCase ( "true" ));
278
+ Assume .assumeFalse (QUICKTEST );
279
+
273
280
logTestBegin ("testBCreateDomainWithDefaultValuesInSampleInputs" );
274
281
logger .info ("Creating Domain domain10 & verifing the domain creation" );
275
282
if (operator1 == null ) {
@@ -284,8 +291,7 @@ public void testBCreateDomainWithDefaultValuesInSampleInputs() throws Exception
284
291
285
292
@ Test
286
293
public void testDeleteOneDomain () throws Exception {
287
- Assume .assumeFalse (
288
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
294
+ Assume .assumeFalse (QUICKTEST );
289
295
logTestBegin ("Deleting one domain." );
290
296
291
297
if (operatorForDel1 == null ) {
@@ -303,8 +309,7 @@ public void testDeleteOneDomain() throws Exception {
303
309
304
310
@ Test
305
311
public void testDeleteTwoDomains () throws Exception {
306
- Assume .assumeFalse (
307
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
312
+ Assume .assumeFalse (QUICKTEST );
308
313
logTestBegin ("Deleting two domains." );
309
314
310
315
if (operatorForDel2 == null ) {
@@ -337,9 +342,11 @@ private Domain testAllUseCasesForADomain(Operator operator, String domainYamlFil
337
342
logger .info ("Creating Domain & verifing the domain creation" );
338
343
// create domain1
339
344
Domain domain = testDomainCreation (domainYamlFile );
340
- testClusterScaling (operator , domain );
341
- testDomainLifecyle (operator , domain );
342
- testOperatorLifecycle (operator , domain );
345
+ if (!SMOKETEST ) {
346
+ testClusterScaling (operator , domain );
347
+ testDomainLifecyle (operator , domain );
348
+ testOperatorLifecycle (operator , domain );
349
+ }
343
350
return domain ;
344
351
}
345
352
0 commit comments