Provide more control over when the health endpoint shows details

Closes gh-11869
This commit is contained in:
Andy Wilkinson
2018-02-07 08:54:12 +00:00
parent 1975d51106
commit 8605499a64
18 changed files with 213 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,7 +39,8 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
"management.server.port=0", "management.endpoints.web.base-path=/admin" })
"management.server.port=0", "management.endpoints.web.base-path=/admin",
"management.endpoint.health.show-details=never" })
public class ManagementPortAndPathSampleActuatorApplicationTests {
@LocalServerPort

View File

@@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
"management.server.port=0", "management.endpoint.health.show-details=true" })
"management.server.port=0", "management.endpoint.health.show-details=always" })
public class ManagementPortSampleActuatorApplicationTests {
@LocalServerPort