use of org.guvnor.ala.build.maven.config.impl.MavenProjectConfigImpl in project kie-wb-common by kiegroup.
the class RestPipelineEventsTest method testEventsPropagation.
@Test
public void testEventsPropagation() {
List<PipelineConfigStage> configs = new ArrayList<>();
configs.add(new PipelineConfigStage("GitConfig", new GitConfigImpl()));
configs.add(new PipelineConfigStage("MavenProjectConfig", new MavenProjectConfigImpl()));
pipelineService.newPipeline(new PipelineConfigImpl("mypipe", configs));
Input input = new Input();
input.put("repo-name", "drools-workshop-events");
input.put("create-repo", "true");
input.put("branch", "master");
input.put("out-dir", tempPath.getAbsolutePath());
input.put("origin", gitUrl);
pipelineService.runPipeline("mypipe", input, false);
assertEquals(6, listener.getEvents().size());
assertTrue(listener.getEvents().get(0) instanceof BeforePipelineExecutionEvent);
assertTrue(listener.getEvents().get(1) instanceof BeforeStageExecutionEvent);
assertTrue(listener.getEvents().get(2) instanceof AfterStageExecutionEvent);
assertTrue(listener.getEvents().get(3) instanceof BeforeStageExecutionEvent);
assertTrue(listener.getEvents().get(4) instanceof AfterStageExecutionEvent);
assertTrue(listener.getEvents().get(5) instanceof AfterPipelineExecutionEvent);
}
Aggregations