Make LeaderAutoConfigurationTests pass without Kubernetes

This commit is contained in:
Gytis Trikleris
2018-08-14 12:53:11 +02:00
committed by Ioannis Canellos
parent ca80117f35
commit b8405f2005

View File

@@ -22,13 +22,13 @@ import org.junit.runner.RunWith;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
properties = { "spring.application.name=leader-autoconfig-test",
"spring.cloud.kubernetes.leader.labels.app=myapp"}
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"spring.cloud.kubernetes.leader.autoStartup=false" // Make sure test passes without Kubernetes cluster
}
)
public class LeaderAutoConfigurationTests {