Skip to content

Commit 0757d24

Browse files
author
Dave Syer
committed
Fix /configprops tests
1 parent 6ad626d commit 0757d24

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void testEmptyMapIsNotAdded() throws Exception {
166166
Map<String, Object> map = (Map<String, Object>) nestedProperties
167167
.get("properties");
168168
assertNotNull(map);
169-
assertEquals(2, map.size());
169+
assertEquals(3, map.size());
170170
assertEquals(null, (map.get("map")));
171171
}
172172

@@ -206,7 +206,8 @@ public void testMapWithMetadata() throws Exception {
206206
Map<String, Object> map = (Map<String, Object>) nestedProperties
207207
.get("properties");
208208
assertNotNull(map);
209-
assertEquals(2, map.size());
209+
// Only one property is mapped in metadata so the others are ignored
210+
assertEquals(1, map.size());
210211
assertEquals("foo", ((Map<String, Object>) map.get("map")).get("name"));
211212
}
212213

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{"properties": [
22
{
33
"name": "bar.name",
4+
"type": "java.util.Map",
45
"dataType": "java.lang.String"
56
},
67
{
78
"name": "spam.map.name",
9+
"type": "java.util.Map",
810
"dataType": "java.lang.String"
911
} ]}
1012

0 commit comments

Comments
 (0)