use of com.walmartlabs.concord.client.ConcordTaskParams.ForkParams in project concord by walmartlabs.
the class ConcordTaskParamsTest method testForks.
@Test
public void testForks() {
List<String> tags = Arrays.asList("x", "y", "z");
Map<String, Object> input = new HashMap<>();
input.put("action", "fork");
input.put("tags", tags);
input.put("forks", Arrays.asList(Collections.singletonMap("entryPoint", "aaa"), Collections.singletonMap("entryPoint", "bbb")));
ForkParams params = (ForkParams) ConcordTaskParams.of(new MapBackedVariables(input), Collections.emptyMap());
List<ForkStartParams> forks = params.forks();
assertEquals(2, forks.size());
ForkStartParams f1 = forks.get(0);
assertEquals("aaa", f1.entryPoint());
assertTrue(f1.tags().containsAll(tags));
ForkStartParams f2 = forks.get(1);
assertEquals("bbb", f2.entryPoint());
assertTrue(f2.tags().containsAll(tags));
System.out.println(params);
}
Aggregations