|
1 | 1 | package org.springframework.cloud.autoconfigure;
|
2 | 2 |
|
| 3 | +import static org.hamcrest.Matchers.equalTo; |
| 4 | +import static org.hamcrest.Matchers.instanceOf; |
| 5 | +import static org.hamcrest.Matchers.is; |
| 6 | +import static org.junit.Assert.assertThat; |
| 7 | + |
3 | 8 | import org.junit.Test;
|
4 | 9 | import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
|
5 | 10 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
10 | 15 | import org.springframework.http.HttpStatus;
|
11 | 16 | import org.springframework.http.ResponseEntity;
|
12 | 17 |
|
13 |
| -import static org.hamcrest.Matchers.equalTo; |
14 |
| -import static org.hamcrest.Matchers.instanceOf; |
15 |
| -import static org.hamcrest.Matchers.is; |
16 |
| -import static org.junit.Assert.assertThat; |
17 |
| - |
18 | 18 | /**
|
19 | 19 | * @author Spencer Gibb
|
20 | 20 | */
|
@@ -44,6 +44,21 @@ public void resumeMvcEndpointDisabled() {
|
44 | 44 | public void restartMvcEndpointDisabled() {
|
45 | 45 | endpointDisabled("endpoints.restart.enabled", "restartMvcEndpoint");
|
46 | 46 | }
|
| 47 | + |
| 48 | + @Test |
| 49 | + public void pauseMvcEndpointGloballyDisabled() { |
| 50 | + endpointDisabled("endpoints.enabled", "pauseMvcEndpoint"); |
| 51 | + } |
| 52 | + |
| 53 | + @Test |
| 54 | + public void resumeMvcEndpointGloballyDisabled() { |
| 55 | + endpointDisabled("endpoints.enabled", "resumeMvcEndpoint"); |
| 56 | + } |
| 57 | + |
| 58 | + @Test |
| 59 | + public void restartMvcEndpointGloballyDisabled() { |
| 60 | + endpointDisabled("endpoints.enabled", "restartMvcEndpoint"); |
| 61 | + } |
47 | 62 |
|
48 | 63 | private void endpointDisabled(String enabledProp, String beanName) {
|
49 | 64 | try (ConfigurableApplicationContext context = getApplicationContext(Config.class,
|
|
0 commit comments