Add a test for the version so deployer doesn't get deployed

Also unignore test in dataflow server
This commit is contained in:
Dave Syer
2017-04-26 16:23:07 +01:00
parent ac9cfc1bae
commit a12950bc7a
6 changed files with 23 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ public class DeployerApplication {
private static final Logger logger = LoggerFactory
.getLogger(DeployerApplication.class);
private static final String DEFAULT_VERSION = "1.3.1.BUILD-SNAPSHOT";
private static final String DEFAULT_VERSION = "1.3.2.BUILD-SNAPSHOT";
private String[] args;
@@ -100,7 +100,7 @@ public class DeployerApplication {
}
}
private String getVersion() {
String getVersion() {
Package pkg = DeployerApplication.class.getPackage();
return (pkg != null ? pkg.getImplementationVersion() == null ? DEFAULT_VERSION
: pkg.getImplementationVersion() : DEFAULT_VERSION);

View File

@@ -98,9 +98,10 @@ spring:
deployables:
configserver:
properties:
spring.cloud.deployer.thin.profile: rabbit
thin.profile: rabbit
application-properties:
spring.cloud.bus.enabled: true
debug: true
eureka:
properties:
spring.cloud.deployer.thin.profile: rabbit

View File

@@ -30,6 +30,15 @@ public class DeployerApplicationTests {
@Rule
public OutputCapture output = new OutputCapture();
@Test
public void testDefaultLibrary() throws Exception {
DeployerApplication wrapper = new DeployerApplication();
if (System.getProperty("project.version") != null) {
assertThat(wrapper.getVersion(),
containsString(System.getProperty("project.version")));
}
}
@Test
public void testCreateClassLoaderAndListDeployables() throws Exception {
new DeployerApplication("--launcher.list=true").run();