Commit 95ecbc73 authored by Andy Wilkinson's avatar Andy Wilkinson

Update example for disk space health indicator to use DataSize

See gh-14549
parent 6145b3d2
......@@ -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
@Bean
public DiskSpaceHealthIndicator diskSpaceHealthIndicator() {
return new DiskSpaceHealthIndicator(new File("."), 1024 * 1024 * 10);
return new DiskSpaceHealthIndicator(new File("."), DataSize.ofMegabytes(10));
}
@Bean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment