See gh-8621
This commit is contained in:
Stephane Nicoll 2017-03-15 08:57:24 +01:00
parent 6be2cc30d3
commit cd8684499d
3 changed files with 3 additions and 8 deletions

View File

@ -68,7 +68,7 @@ public class NoSpringSecurityHealthMvcEndpointIntegrationTests {
}
@Test
public void healthWhenRightRoleNotPresentShouldExposeHealthDetails()
public void healthWhenRightRoleNotPresentShouldNotExposeHealthDetails()
throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
@ -77,7 +77,7 @@ public class NoSpringSecurityHealthMvcEndpointIntegrationTests {
MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(this.context).build();
mockMvc.perform(get("/health").with(getRequestPostProcessor()))
.andExpect(status().isOk())
.andExpect(content().string(containsString("\"status\":\"UP\"")));
.andExpect(content().string("{\"status\":\"UP\"}"));
}
@Test

View File

@ -23,14 +23,12 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
import org.springframework.boot.junit.runner.classpath.ClassPathExclusions;
import org.springframework.boot.junit.runner.classpath.ModifiedClassPathRunner;
import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.method.HandlerMethod;
@ -47,9 +45,6 @@ import static org.mockito.Mockito.mock;
@ClassPathExclusions("spring-security-*.jar")
public class NoSpringSecurityMvcEndpointSecurityInterceptorTests {
@Rule
public OutputCapture output = new OutputCapture();
private MvcEndpointSecurityInterceptor securityInterceptor;
private TestMvcEndpoint mvcEndpoint;

View File

@ -217,7 +217,7 @@ NOTE: `PropertiesLauncher` supports loading properties from
|`loader.home`
|Used to resolve relative paths in `loader.path`. E.g. `loader.path=lib` then
`${loader.home}/lib` is a classpath location (along with all jar files in that
directory). Also used to locate a `loader.properties file`. Example `file:///opt/app`
directory). Also used to locate a `loader.properties` file. Example `file:///opt/app`
(defaults to `${user.dir}`).
|`loader.args`