Improve structure of response from configprops endpoint

Closes gh-10162
This commit is contained in:
Andy Wilkinson
2017-09-05 10:34:13 +01:00
parent 27c1b5eb4c
commit ab54801143
7 changed files with 183 additions and 149 deletions

View File

@@ -223,6 +223,7 @@ public class SampleActuatorApplicationTests {
assertThat(((String) body.get("id"))).startsWith("application");
}
@SuppressWarnings("unchecked")
@Test
public void testConfigProps() throws Exception {
@SuppressWarnings("rawtypes")
@@ -230,9 +231,8 @@ public class SampleActuatorApplicationTests {
.withBasicAuth("user", getPassword())
.getForEntity("/application/configprops", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
@SuppressWarnings("unchecked")
Map<String, Object> body = entity.getBody();
assertThat(body)
assertThat((Map<String, Object>) body.get("beans"))
.containsKey("spring.datasource-" + DataSourceProperties.class.getName());
}