@@ -45,6 +45,20 @@ public class ITOperator extends BaseTest {
45
45
private static Operator operator1 , operator2 ;
46
46
private static Domain domain1 ;
47
47
48
+ private static boolean QUICKTEST ;
49
+ private static boolean SMOKETEST ;
50
+
51
+ // Set QUICKTEST env var to true to run a small subset of tests.
52
+ // Set SMOKETEST env var to true to run an even smaller subset
53
+ // of tests, plus leave domain1 up and running when the test completes.
54
+ static {
55
+ QUICKTEST =
56
+ System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" );
57
+ SMOKETEST =
58
+ System .getenv ("SMOKETEST" ) != null && System .getenv ("SMOKETEST" ).equalsIgnoreCase ("true" );
59
+ if (SMOKETEST ) QUICKTEST = true ;
60
+ }
61
+
48
62
/**
49
63
* This method gets called only once before any of the test methods are executed. It does the
50
64
* initialization of the integration test properties defined in OperatorIT.properties and setting
@@ -94,16 +108,15 @@ public void test1CreateFirstOperatorAndDomain() throws Exception {
94
108
logTestBegin ("test1CreateFirstOperatorAndDomain" );
95
109
testCreateOperatorManagingDefaultAndTest1NS ();
96
110
domain1 = testAllUseCasesForADomain (operator1 , domain1YamlFile );
97
- domain1 .testWlsLivenessProbe ();
98
- domain1 .destroy ();
111
+ if (! SMOKETEST ) domain1 .testWlsLivenessProbe ();
112
+ if (! SMOKETEST ) domain1 .destroy ();
99
113
100
114
logger .info ("SUCCESS - test1CreateFirstOperatorAndDomain" );
101
115
}
102
116
103
117
@ Test
104
118
public void test2CreateAnotherDomainInDefaultNS () throws Exception {
105
- Assume .assumeFalse (
106
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
119
+ Assume .assumeFalse (QUICKTEST );
107
120
108
121
logTestBegin ("test2CreateAnotherDomainInDefaultNS" );
109
122
logger .info ("Creating Domain domain2 & verifing the domain creation" );
@@ -120,8 +133,7 @@ public void test2CreateAnotherDomainInDefaultNS() throws Exception {
120
133
121
134
@ Test
122
135
public void test3CreateDomainInTest1NS () throws Exception {
123
- Assume .assumeFalse (
124
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
136
+ Assume .assumeFalse (QUICKTEST );
125
137
126
138
logTestBegin ("test3CreateDomainInTest1NS" );
127
139
logger .info ("Creating Domain domain3 & verifing the domain creation" );
@@ -137,8 +149,7 @@ public void test3CreateDomainInTest1NS() throws Exception {
137
149
138
150
@ Test
139
151
public void test4CreateAnotherOperatorManagingTest2NS () throws Exception {
140
- Assume .assumeFalse (
141
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
152
+ Assume .assumeFalse (QUICKTEST );
142
153
143
154
logTestBegin ("test4CreateAnotherOperatorManagingTest2NS" );
144
155
logger .info ("Creating Operator & waiting for the script to complete execution" );
@@ -149,8 +160,7 @@ public void test4CreateAnotherOperatorManagingTest2NS() throws Exception {
149
160
150
161
@ Test
151
162
public void test5CreateConfiguredDomainInTest2NS () throws Exception {
152
- Assume .assumeFalse (
153
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
163
+ Assume .assumeFalse (QUICKTEST );
154
164
155
165
logTestBegin ("test5CreateConfiguredDomainInTest2NS" );
156
166
logger .info ("Creating Domain domain4 & verifing the domain creation" );
@@ -192,8 +202,7 @@ public void test5CreateConfiguredDomainInTest2NS() throws Exception {
192
202
193
203
@ Test
194
204
public void test6CreateDomainWithStartPolicyAdminOnly () throws Exception {
195
- Assume .assumeFalse (
196
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
205
+ Assume .assumeFalse (QUICKTEST );
197
206
198
207
logTestBegin ("test6CreateDomainWithStartPolicyAdminOnly" );
199
208
logger .info ("Checking if operator1 is running, if not creating" );
@@ -209,8 +218,7 @@ public void test6CreateDomainWithStartPolicyAdminOnly() throws Exception {
209
218
210
219
@ Test
211
220
public void test7CreateDomainPVReclaimPolicyRecycle () throws Exception {
212
- Assume .assumeFalse (
213
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
221
+ Assume .assumeFalse (QUICKTEST );
214
222
215
223
logTestBegin ("test7CreateDomainPVReclaimPolicyRecycle" );
216
224
logger .info ("Checking if operator1 is running, if not creating" );
@@ -227,8 +235,7 @@ public void test7CreateDomainPVReclaimPolicyRecycle() throws Exception {
227
235
228
236
@ Test
229
237
public void test9CreateDomainOnExistingDir () throws Exception {
230
- Assume .assumeFalse (
231
- System .getenv ("QUICKTEST" ) != null && System .getenv ("QUICKTEST" ).equalsIgnoreCase ("true" ));
238
+ Assume .assumeFalse (QUICKTEST );
232
239
233
240
logTestBegin ("test9CreateDomainOnExistingDir" );
234
241
if (operator1 == null ) {
@@ -246,8 +253,8 @@ public void test9CreateDomainOnExistingDir() throws Exception {
246
253
247
254
// @Test
248
255
public void testACreateDomainApacheLB () throws Exception {
249
- Assume .assumeFalse (
250
- System . getenv ( "QUICKTEST" ) != null && System . getenv ( "QUICKTEST" ). equalsIgnoreCase ( "true" ));
256
+ Assume .assumeFalse (QUICKTEST );
257
+
251
258
logTestBegin ("testACreateDomainApacheLB" );
252
259
logger .info ("Creating Domain domain7 & verifing the domain creation" );
253
260
if (operator1 == null ) {
@@ -263,8 +270,8 @@ public void testACreateDomainApacheLB() throws Exception {
263
270
264
271
@ Test
265
272
public void testBCreateDomainWithDefaultValuesInSampleInputs () throws Exception {
266
- Assume .assumeFalse (
267
- System . getenv ( "QUICKTEST" ) != null && System . getenv ( "QUICKTEST" ). equalsIgnoreCase ( "true" ));
273
+ Assume .assumeFalse (QUICKTEST );
274
+
268
275
logTestBegin ("testBCreateDomainWithDefaultValuesInSampleInputs" );
269
276
logger .info ("Creating Domain domain8 & verifing the domain creation" );
270
277
if (operator1 == null ) {
@@ -288,9 +295,11 @@ private Domain testAllUseCasesForADomain(Operator operator, String domainYamlFil
288
295
logger .info ("Creating Domain & verifing the domain creation" );
289
296
// create domain1
290
297
Domain domain = testDomainCreation (domainYamlFile );
291
- testClusterScaling (operator , domain );
292
- testDomainLifecyle (operator , domain );
293
- testOperatorLifecycle (operator , domain );
298
+ if (!SMOKETEST ) {
299
+ testClusterScaling (operator , domain );
300
+ testDomainLifecyle (operator , domain );
301
+ testOperatorLifecycle (operator , domain );
302
+ }
294
303
return domain ;
295
304
}
296
305
0 commit comments