Ignoring LauncherCommandTests.

Similar tests exist in DeployerThreadTests.

See gh-27
This commit is contained in:
Spencer Gibb
2016-09-02 14:09:20 -06:00
parent db389fc83b
commit 621ee6e4b9
4 changed files with 24 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ package org.springframework.cloud.launcher.cli;
import static org.hamcrest.CoreMatchers.containsString;
import static org.junit.Assert.assertThat;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -31,12 +32,14 @@ public class LauncherCommandTests {
public OutputCapture output = new OutputCapture();
@Test
@Ignore("See DeployerThreadTests for similar functionality")
public void testCreateClassLoaderAndListDeployables() throws Exception {
new LauncherCommand().run("--list");
assertThat(output.toString(), containsString("configserver"));
}
@Test
@Ignore("See DeployerThreadTests for similar functionality")
public void testNonOptionArgsPassedDown() throws Exception {
new LauncherCommand().run("--list", "--", "--spring.profiles.active=test");
assertThat(output.toString(), containsString("foo"));

View File

@@ -87,8 +87,12 @@ public class DeployerThread extends Thread {
}
private void quiet() {
LogbackLoggingSystem.get(ClassUtils.getDefaultClassLoader()).setLogLevel("ROOT",
LogLevel.OFF);
try {
LogbackLoggingSystem.get(ClassUtils.getDefaultClassLoader()).setLogLevel("ROOT",
LogLevel.OFF);
} catch (Exception e) {
logger.error("Unable to turn of ROOT logger for quiet()", e);
}
}
private void list() {

View File

@@ -36,4 +36,10 @@ public class DeployerThreadTests {
assertThat(output.toString(), containsString("configserver"));
}
@Test
public void testNonOptionArgsPassedDown() throws Exception {
new DeployerThread(DeployerThread.class.getClassLoader(), "--launcher.list=true", "--spring.profiles.active=test").run();
assertThat(output.toString(), containsString("foo"));
}
}

View File

@@ -0,0 +1,9 @@
spring:
cloud:
launcher:
deployables:
foo:
coordinates: com.example:foo:0.0.1-SNAPSHOT
port: 8000
waitUntilStarted: true
order: -200