@@ -136,12 +136,13 @@ func TestNewResultCollectionFromRegoResultSet(t *testing.T) {
136136 regoResultSet := & rego.ResultSet {
137137 rego.Result {Expressions : []* rego.ExpressionValue {& rego.ExpressionValue {
138138 Value : map [string ]interface {}{
139- "_1_4_3" : []string {},
140- "_1_4_4" : []string {"violation" },
141- "_1_4_5" : []string {},
142- "_1_4_6" : []string {},
143- "node_pools_with_legacy_endpoints_enabled" : []string {},
144- "node_pools_without_cloud_platform_scope" : []string {"violation" },
139+ "_1_4_3" : []interface {}{},
140+ "_1_4_4" : []interface {}{"violation" },
141+ "_1_4_5" : []interface {}{},
142+ "_1_4_6" : []interface {}{},
143+ "node_pools_with_legacy_endpoints_enabled" : []interface {}{},
144+ "node_pools_without_cloud_platform_scope" : []interface {}{"violation" },
145+ "something_returning_a_map" : []interface {}{map [string ]string {"bar" : "foo" }},
145146 },
146147 Text : "data.package.name" ,
147148 }}},
@@ -154,6 +155,7 @@ func TestNewResultCollectionFromRegoResultSet(t *testing.T) {
154155 & Result {ID : "_1_4_6" , Value : []string {}, Violations : []string {}, Package : "package.name" },
155156 & Result {ID : "node_pools_with_legacy_endpoints_enabled" , Value : []string {}, Violations : []string {}, Package : "package.name" },
156157 & Result {ID : "node_pools_without_cloud_platform_scope" , Value : []string {"violation" }, Violations : []string {"violation" }, Package : "package.name" },
158+ & Result {ID : "something_returning_a_map" , Value : []string {fmt .Sprintf ("%+v" , map [string ]string {"bar" : "foo" })}, Violations : []string {fmt .Sprintf ("%+v" , map [string ]string {"bar" : "foo" })}, Package : "package.name" },
157159 }
158160
159161 rc , err := NewResultCollectionFromRegoResultSet (regoResultSet )
0 commit comments