Update tests for edgware
This commit is contained in:
@@ -27,6 +27,8 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.cloud.client.ServiceInstance;
|
||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.client.discovery.composite.CompositeDiscoveryClient;
|
||||
import org.springframework.cloud.client.discovery.simple.SimpleDiscoveryProperties;
|
||||
import org.springframework.cloud.zookeeper.discovery.test.CommonTestConfig;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
@@ -52,10 +54,10 @@ public class ZookeeperDiscoveryAutoRegistrationFalseTests {
|
||||
@Autowired DiscoveryClient discoveryClient;
|
||||
@Value("${spring.application.name}") String springAppName;
|
||||
|
||||
@Test public void discovery_client_is_zookeeper() {
|
||||
@Test public void discovery_client_is_composite() {
|
||||
//given: this.discoveryClient
|
||||
//expect:
|
||||
then(discoveryClient).isInstanceOf(ZookeeperDiscoveryClient.class);
|
||||
then(discoveryClient).isInstanceOf(CompositeDiscoveryClient.class);
|
||||
}
|
||||
|
||||
@Test public void application_should_not_have_been_registered() {
|
||||
@@ -65,11 +67,11 @@ public class ZookeeperDiscoveryAutoRegistrationFalseTests {
|
||||
then(instances).isEmpty();
|
||||
}
|
||||
|
||||
@Test public void should_not_find_local_instance() {
|
||||
@Test public void should_not_find_local_zookeeper_instance() {
|
||||
//given
|
||||
ServiceInstance serviceInstance = this.discoveryClient.getLocalServiceInstance();
|
||||
//expect:
|
||||
then(serviceInstance).isNull();
|
||||
then(serviceInstance).isInstanceOf(SimpleDiscoveryProperties.SimpleServiceInstance.class);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
Reference in New Issue
Block a user