use of org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties in project spring-cloud-sleuth by spring-cloud.
the class SkipPatternProviderConfigTest method managementServerPropertiesWithContextPath.
private ManagementServerProperties managementServerPropertiesWithContextPath() {
ManagementServerProperties managementServerProperties = new ManagementServerProperties();
managementServerProperties.getServlet().setContextPath("/management/context");
return managementServerProperties;
}
use of org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties in project spring-cloud-sleuth by spring-cloud.
the class SkipPatternProviderConfigTest method should_pick_default_pattern_when_both_management_context_and_skip_patterns_are_empty.
@Test
public void should_pick_default_pattern_when_both_management_context_and_skip_patterns_are_empty() throws Exception {
SleuthWebProperties sleuthWebProperties = new SleuthWebProperties();
sleuthWebProperties.setSkipPattern("");
ManagementServerProperties managementServerProperties = new ManagementServerProperties();
managementServerProperties.getServlet().setContextPath("");
Pattern pattern = TraceWebAutoConfiguration.SkipPatternProviderConfig.getPatternForManagementServerProperties(managementServerProperties, sleuthWebProperties);
then(pattern.pattern()).isEqualTo(SleuthWebProperties.DEFAULT_SKIP_PATTERN);
}
use of org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties in project spring-cloud-sleuth by spring-cloud.
the class SkipPatternProviderConfigTest method should_pick_skip_pattern_when_its_not_empty_and_management_context_is_empty.
@Test
public void should_pick_skip_pattern_when_its_not_empty_and_management_context_is_empty() throws Exception {
SleuthWebProperties sleuthWebProperties = new SleuthWebProperties();
sleuthWebProperties.setSkipPattern("foo.*|bar.*");
Pattern pattern = TraceWebAutoConfiguration.SkipPatternProviderConfig.getPatternForManagementServerProperties(new ManagementServerProperties(), sleuthWebProperties);
then(pattern.pattern()).isEqualTo("foo.*|bar.*");
}
use of org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties in project spring-cloud-sleuth by spring-cloud.
the class SkipPatternProviderConfigTest method should_pick_skip_pattern_and_additional_pattern_when_its_not_empty_and_management_context_is_empty.
@Test
public void should_pick_skip_pattern_and_additional_pattern_when_its_not_empty_and_management_context_is_empty() throws Exception {
SleuthWebProperties sleuthWebProperties = new SleuthWebProperties();
sleuthWebProperties.setSkipPattern("foo.*|bar.*");
sleuthWebProperties.setAdditionalSkipPattern("baz.*|faz.*");
Pattern pattern = TraceWebAutoConfiguration.SkipPatternProviderConfig.getPatternForManagementServerProperties(new ManagementServerProperties(), sleuthWebProperties);
then(pattern.pattern()).isEqualTo("foo.*|bar.*|baz.*|faz.*");
}
use of org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties in project spring-cloud-sleuth by spring-cloud.
the class SkipPatternProviderConfigTest method should_pick_default_pattern_with_additional_pattern_when_both_management_context_and_skip_patterns_are_empty.
@Test
public void should_pick_default_pattern_with_additional_pattern_when_both_management_context_and_skip_patterns_are_empty() throws Exception {
SleuthWebProperties sleuthWebProperties = new SleuthWebProperties();
sleuthWebProperties.setSkipPattern("");
sleuthWebProperties.setAdditionalSkipPattern("baz.*|faz.*");
ManagementServerProperties managementServerProperties = new ManagementServerProperties();
managementServerProperties.getServlet().setContextPath("");
Pattern pattern = TraceWebAutoConfiguration.SkipPatternProviderConfig.getPatternForManagementServerProperties(managementServerProperties, sleuthWebProperties);
then(pattern.pattern()).isEqualTo(SleuthWebProperties.DEFAULT_SKIP_PATTERN + "|baz.*|faz.*");
}
Aggregations