From 0757d24d91bfe9ea2256c19aa798a5fa10bb6692 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 19 Nov 2014 14:33:49 +0000 Subject: [PATCH] Fix /configprops tests --- ...figurationPropertiesReportEndpointSerializationTests.java | 5 +++-- .../META-INF/test-spring-configuration-metadata.json | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java index 6b4c4a6004..88938e8038 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpointSerializationTests.java @@ -166,7 +166,7 @@ public class ConfigurationPropertiesReportEndpointSerializationTests { Map map = (Map) nestedProperties .get("properties"); assertNotNull(map); - assertEquals(2, map.size()); + assertEquals(3, map.size()); assertEquals(null, (map.get("map"))); } @@ -206,7 +206,8 @@ public class ConfigurationPropertiesReportEndpointSerializationTests { Map map = (Map) nestedProperties .get("properties"); assertNotNull(map); - assertEquals(2, map.size()); + // Only one property is mapped in metadata so the others are ignored + assertEquals(1, map.size()); assertEquals("foo", ((Map) map.get("map")).get("name")); } diff --git a/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json b/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json index 3363bf04fa..712014c6c6 100644 --- a/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json +++ b/spring-boot-actuator/src/test/resources/META-INF/test-spring-configuration-metadata.json @@ -1,10 +1,12 @@ {"properties": [ { "name": "bar.name", + "type": "java.util.Map", "dataType": "java.lang.String" }, { "name": "spam.map.name", + "type": "java.util.Map", "dataType": "java.lang.String" } ]}