@@ -77,6 +77,21 @@ func testConfigurationMetadata(t *testing.T, context spec.G, it spec.S) {
77
77
}))
78
78
})
79
79
80
+ it ("returns dataflow decoded contents handling trailing comma correctly" , func () {
81
+ Expect (os .MkdirAll (filepath .Join (path , "META-INF" ), 0755 )).To (Succeed ())
82
+ Expect (ioutil .WriteFile (filepath .Join (path , "META-INF" , "spring-configuration-metadata.json" ),
83
+ []byte (`{ "properties": [ { "name": "alpha", "sourceType": "alpha" }, { "name": "beta" } ] }` ), 0644 ))
84
+ Expect (ioutil .WriteFile (filepath .Join (path , "META-INF" , "dataflow-configuration-metadata.properties" ),
85
+ []byte ("configuration-properties.classes=alpha," ), 0644 ))
86
+
87
+ cm , err := boot .NewConfigurationMetadataFromPath (path )
88
+ Expect (err ).NotTo (HaveOccurred ())
89
+
90
+ Expect (boot .NewDataFlowConfigurationMetadata (path , cm )).To (Equal (boot.ConfigurationMetadata {
91
+ Properties : []boot.Property {{Name : "alpha" , SourceType : "alpha" }},
92
+ }))
93
+ })
94
+
80
95
it ("returns dataflow decoded contents" , func () {
81
96
Expect (os .MkdirAll (filepath .Join (path , "META-INF" ), 0755 )).To (Succeed ())
82
97
Expect (ioutil .WriteFile (filepath .Join (path , "META-INF" , "spring-configuration-metadata.json" ),
0 commit comments