Upgraded versions and fixed test
This commit upgrades the versions to the latest and greatest as well as removes the custom implementation of a TaskLauncher.
This commit is contained in:
@@ -16,13 +16,12 @@
|
||||
|
||||
package io.spring.configuration;
|
||||
|
||||
import org.springframework.cloud.deployer.spi.core.AppDeploymentRequest;
|
||||
import org.springframework.cloud.deployer.spi.task.LaunchState;
|
||||
import org.springframework.cloud.deployer.spi.task.TaskLauncher;
|
||||
import org.springframework.cloud.deployer.spi.task.TaskStatus;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
/**
|
||||
* @author Glenn Renfro
|
||||
*/
|
||||
@@ -31,38 +30,7 @@ public class TaskSinkConfiguration {
|
||||
|
||||
@Bean
|
||||
public TaskLauncher taskLauncher() {
|
||||
return new TestTaskLauncher();
|
||||
}
|
||||
|
||||
public class TestTaskLauncher implements TaskLauncher {
|
||||
|
||||
public static final String LAUNCH_ID = "TEST_LAUNCH_ID";
|
||||
|
||||
private LaunchState state = LaunchState.unknown;
|
||||
|
||||
@Override
|
||||
public String launch(AppDeploymentRequest request) {
|
||||
state = LaunchState.complete;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskStatus status(String id) {
|
||||
String taskLaunchId = LAUNCH_ID;
|
||||
TaskStatus taskStatus = new TaskStatus(taskLaunchId, state, null);
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanup(String id) {}
|
||||
|
||||
@Override
|
||||
public void destroy(String appName) {}
|
||||
return mock(TaskLauncher.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user