@@ -251,4 +251,72 @@ public void testStartChildFinishedWithError() throws Exception {
251
251
byte [] ab = getLog (pir .getLogFileName ());
252
252
assertLog (".*Child process.*FAILED.*BOOOM.*" , ab );
253
253
}
254
+
255
+ @ Test (timeout = 60000 )
256
+ public void testForkWithItemsWithOutVariable () throws Exception {
257
+ String orgName = "org_" + randomString ();
258
+
259
+ OrganizationsApi orgApi = new OrganizationsApi (getApiClient ());
260
+ orgApi .createOrUpdate (new OrganizationEntry ().setName (orgName ));
261
+
262
+ String projectName = "project_" + randomString ();
263
+
264
+ ProjectsApi projectsApi = new ProjectsApi (getApiClient ());
265
+ projectsApi .createOrUpdate (orgName , new ProjectEntry ()
266
+ .setName (projectName )
267
+ .setVisibility (ProjectEntry .VisibilityEnum .PUBLIC )
268
+ .setAcceptsRawPayload (true ));
269
+
270
+ byte [] payload = archive (ProcessRbacIT .class .getResource ("concordTaskForkWithItemsWithOut" ).toURI ());
271
+ Map <String , Object > input = new HashMap <>();
272
+ input .put ("archive" , payload );
273
+ input .put ("org" , orgName );
274
+ input .put ("project" , projectName );
275
+
276
+ StartProcessResponse spr = start (input );
277
+
278
+ ProcessApi processApi = new ProcessApi (getApiClient ());
279
+ ProcessEntry pir = waitForStatus (processApi , spr .getInstanceId (), ProcessEntry .StatusEnum .FAILED );
280
+
281
+ // ---
282
+
283
+ byte [] ab = getLog (pir .getLogFileName ());
284
+ assertLog (".*color=RED.*" , ab );
285
+ assertLog (".*color=WHITE.*" , ab );
286
+ assertLog (".*Done.*\\ [\\ [.*\\ ], \\ [.*\\ ]\\ ] is completed.*" , ab );
287
+ }
288
+
289
+ @ Test (timeout = 60000 )
290
+ public void testForkWithItems () throws Exception {
291
+ String orgName = "org_" + randomString ();
292
+
293
+ OrganizationsApi orgApi = new OrganizationsApi (getApiClient ());
294
+ orgApi .createOrUpdate (new OrganizationEntry ().setName (orgName ));
295
+
296
+ String projectName = "project_" + randomString ();
297
+
298
+ ProjectsApi projectsApi = new ProjectsApi (getApiClient ());
299
+ projectsApi .createOrUpdate (orgName , new ProjectEntry ()
300
+ .setName (projectName )
301
+ .setVisibility (ProjectEntry .VisibilityEnum .PUBLIC )
302
+ .setAcceptsRawPayload (true ));
303
+
304
+ byte [] payload = archive (ProcessRbacIT .class .getResource ("concordTaskForkWithItems" ).toURI ());
305
+ Map <String , Object > input = new HashMap <>();
306
+ input .put ("archive" , payload );
307
+ input .put ("org" , orgName );
308
+ input .put ("project" , projectName );
309
+
310
+ StartProcessResponse spr = start (input );
311
+
312
+ ProcessApi processApi = new ProcessApi (getApiClient ());
313
+ ProcessEntry pir = waitForStatus (processApi , spr .getInstanceId (), ProcessEntry .StatusEnum .FAILED );
314
+
315
+ // ---
316
+
317
+ byte [] ab = getLog (pir .getLogFileName ());
318
+ assertLog (".*color=RED.*" , ab );
319
+ assertLog (".*color=WHITE.*" , ab );
320
+ assertLog (".*Done.*\\ [\\ [.*\\ ], \\ [.*\\ ]\\ ] is completed.*" , ab );
321
+ }
254
322
}
0 commit comments