Browse Source

Merge branch '1.5.x'

pull/8830/merge
Stephane Nicoll 9 years ago
parent
commit
bdf2b2e810
  1. 2
      spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/LoggersEndpointTests.java

2
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/LoggersEndpointTests.java

@ -65,6 +65,7 @@ public class LoggersEndpointTests extends AbstractEndpointTests<LoggersEndpoint>
LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG, LogLevel.TRACE); LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG, LogLevel.TRACE);
} }
@Test
public void invokeWhenNameSpecifiedShouldReturnLevels() throws Exception { public void invokeWhenNameSpecifiedShouldReturnLevels() throws Exception {
given(getLoggingSystem().getLoggerConfiguration("ROOT")) given(getLoggingSystem().getLoggerConfiguration("ROOT"))
.willReturn(new LoggerConfiguration("ROOT", null, LogLevel.DEBUG)); .willReturn(new LoggerConfiguration("ROOT", null, LogLevel.DEBUG));
@ -73,6 +74,7 @@ public class LoggersEndpointTests extends AbstractEndpointTests<LoggersEndpoint>
assertThat(levels.getEffectiveLevel()).isEqualTo("DEBUG"); assertThat(levels.getEffectiveLevel()).isEqualTo("DEBUG");
} }
@Test
public void setLogLevelShouldSetLevelOnLoggingSystem() throws Exception { public void setLogLevelShouldSetLevelOnLoggingSystem() throws Exception {
getEndpointBean().setLogLevel("ROOT", LogLevel.DEBUG); getEndpointBean().setLogLevel("ROOT", LogLevel.DEBUG);
verify(getLoggingSystem()).setLogLevel("ROOT", LogLevel.DEBUG); verify(getLoggingSystem()).setLogLevel("ROOT", LogLevel.DEBUG);

Loading…
Cancel
Save