@Test public void testProvisioningUsingMaven() { final String gav = "org.jbpm:jbpm-wb-case-mgmt-showcase:war:1.0.0"; when(settings.isProvisioningEnabled()).thenReturn(true); when(settings.isDeployFromLocalPath()).thenReturn(false); when(settings.getGAV()).thenReturn(gav); service.init(); ArgumentCaptor<Input> captor = ArgumentCaptor.forClass(Input.class); verify(executor).execute(any(PipelineExecutor.class), any(Pipeline.class), captor.capture()); assertEquals(gav, captor.getValue().get("artifact")); }
@Test public void testProvisioningUsingWarPath() { final String path = "path/to/file.war"; when(settings.isProvisioningEnabled()).thenReturn(true); when(settings.isDeployFromLocalPath()).thenReturn(true); when(settings.getPath()).thenReturn(path); service.init(); ArgumentCaptor<Input> captor = ArgumentCaptor.forClass(Input.class); verify(executor).execute(any(PipelineExecutor.class), any(Pipeline.class), captor.capture()); assertEquals(path, captor.getValue().get("war-path")); }
@Test public void testProvisioningUsingWarPath() { final String path = "path/to/file.war"; when(settings.isProvisioningEnabled()).thenReturn(true); when(settings.isDeployFromLocalPath()).thenReturn(true); when(settings.getPath()).thenReturn(path); service.init(); ArgumentCaptor<Input> captor = ArgumentCaptor.forClass(Input.class); verify(executor).execute(any(PipelineExecutor.class), any(Pipeline.class), captor.capture()); assertEquals(path, captor.getValue().get("war-path")); }
@Test public void testProvisioningUsingMaven() { final String gav = "org.jbpm:jbpm-wb-case-mgmt-showcase:war:1.0.0"; when(settings.isProvisioningEnabled()).thenReturn(true); when(settings.isDeployFromLocalPath()).thenReturn(false); when(settings.getGAV()).thenReturn(gav); service.init(); ArgumentCaptor<Input> captor = ArgumentCaptor.forClass(Input.class); verify(executor).execute(any(PipelineExecutor.class), any(Pipeline.class), captor.capture()); assertEquals(gav, captor.getValue().get("artifact")); }
@Test public void testBuild() { Input result = PipelineInputBuilder.newInstance() .withProvider(providerKey) .withParams(params) .withRuntimeName(RUNTIME).build(); assertNotNull(result); assertEquals(RUNTIME, result.get(RuntimeConfig.RUNTIME_NAME)); assertEquals(PROVIDER, result.get(ProviderConfig.PROVIDER_NAME)); params.forEach((name, value) -> assertEquals(value, result.get(name))); }
@Test public void testBuild() { Input result = PipelineInputBuilder.newInstance() .withProvider(providerKey) .withParams(params) .withRuntimeName(RUNTIME).build(); assertNotNull(result); assertEquals(RUNTIME, result.get(RuntimeConfig.RUNTIME_NAME)); assertEquals(PROVIDER, result.get(ProviderConfig.PROVIDER_NAME)); params.forEach((name, value) -> assertEquals(value, result.get(name))); }
throw new BusinessException("Pipeline: " + pipelineId + " was not found."); String providerName = input.get(ProviderConfig.PROVIDER_NAME); Provider provider = null; ProviderType providerType = null;
item.setRuntimeName(pipelineExecutorTrace.getTask().getTaskDef().getInput().get(RuntimeConfig.RUNTIME_NAME));