Removes tags as metadata.

See gh-630
This commit is contained in:
Spencer Gibb
2020-04-16 23:12:05 -04:00
parent f67284561e
commit 6485240922

View File

@@ -44,7 +44,7 @@ public class ConsulConfigServerAutoConfigurationTests {
}
@Test
public void offByDefault() throws Exception {
public void offByDefault() {
this.context = new AnnotationConfigApplicationContext(
ConsulConfigServerAutoConfiguration.class);
assertThat(
@@ -53,18 +53,7 @@ public class ConsulConfigServerAutoConfigurationTests {
}
@Test
public void onWhenRequested() throws Exception {
setup("spring.cloud.config.server.prefix=/config");
assertThat(
this.context.getBeanNamesForType(ConsulDiscoveryProperties.class).length)
.isEqualTo(1);
ConsulDiscoveryProperties properties = this.context
.getBean(ConsulDiscoveryProperties.class);
assertThat(properties.getTags()).containsExactly("configPath=/config");
}
@Test
public void onWhenRequestedMetadata() throws Exception {
public void onWhenRequested() {
setup("spring.cloud.config.server.prefix=/config",
"spring.cloud.consul.discovery.tags-as-metadata=false");
assertThat(