Browse Source

Update example for disk space health indicator to use DataSize

See gh-14549
pull/14592/head
Andy Wilkinson 8 years ago
parent
commit
95ecbc736b
  1. 3
      spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java

3
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/HealthEndpointDocumentationTests.java

@ -40,6 +40,7 @@ import org.springframework.context.annotation.Bean; @@ -40,6 +40,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.restdocs.payload.FieldDescriptor;
import org.springframework.util.unit.DataSize;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath;
@ -105,7 +106,7 @@ public class HealthEndpointDocumentationTests extends MockMvcEndpointDocumentati @@ -105,7 +106,7 @@ public class HealthEndpointDocumentationTests extends MockMvcEndpointDocumentati
@Bean
public DiskSpaceHealthIndicator diskSpaceHealthIndicator() {
return new DiskSpaceHealthIndicator(new File("."), 1024 * 1024 * 10);
return new DiskSpaceHealthIndicator(new File("."), DataSize.ofMegabytes(10));
}
@Bean

Loading…
Cancel
Save