Ensure there is a NoopDiscoveryClient if @EnableZuulProxy
See https://github.com/spring-cloud/spring-cloud-commons/issues/80
This commit is contained in:
@@ -29,10 +29,6 @@
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-zuul</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-eureka</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.TestRestTemplate;
|
||||
import org.springframework.boot.test.WebIntegrationTest;
|
||||
import org.springframework.cloud.client.discovery.DiscoveryClient;
|
||||
import org.springframework.cloud.netflix.eureka.EurekaDiscoveryClient;
|
||||
import org.springframework.cloud.client.discovery.noop.NoopDiscoveryClient;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
@@ -53,6 +53,6 @@ public class ZuulProxyApplicationTests {
|
||||
|
||||
@Test
|
||||
public void discoveryClientIsNoop() {
|
||||
assertTrue("discoveryClient is wrong type", this.discoveryClient instanceof EurekaDiscoveryClient);
|
||||
assertTrue("discoveryClient is wrong type", this.discoveryClient instanceof NoopDiscoveryClient);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user