diff --git a/metacat-functional-tests/src/functionalTest/groovy/com/netflix/metacat/MetacatSmokeSpec.groovy b/metacat-functional-tests/src/functionalTest/groovy/com/netflix/metacat/MetacatSmokeSpec.groovy index 4d65c6e89..ca96e6e53 100644 --- a/metacat-functional-tests/src/functionalTest/groovy/com/netflix/metacat/MetacatSmokeSpec.groovy +++ b/metacat-functional-tests/src/functionalTest/groovy/com/netflix/metacat/MetacatSmokeSpec.groovy @@ -223,13 +223,18 @@ class MetacatSmokeSpec extends Specification { def nestedFieldDto = tableDTO.getFields().find { it.pos == 1 } // assert that the type field also keeps the name fidelity assert nestedFieldDto.type == "(name: chararray,address: (NAME: chararray),nestedArray: {(FIELD1: chararray,field2: chararray)})" : "The type differ from the expected. They are: $nestedFieldDto.type" + // assert that the json representation keeps the name fidelity + // 1. assert the first level fieldName fidelity - def firstLevelFieldsNames = nestedFieldDto.jsonType.fields - assert ["name", "address", "nestedArray"] == firstLevelFieldsNames.collect { it.name } : "The first level nested fields names differ from the expected. They are: $firstLevelFieldsNames.collect { it.name }" + def firstLevelFields = nestedFieldDto.jsonType.fields + def firstLevelFieldNames = firstLevelFields.collect { it.name } + assert ["name", "address", "nestedArray"] == firstLevelFieldNames : "The first level nested fields names differ from the expected. They are: $firstLevelFieldNames" + // 2. assert that the second level fieldName in address Struct keeps its fieldname fidelity def addressStruct = nestedFieldDto.jsonType.fields[1] assert addressStruct.type.fields[0].name == "NAME" : "The second level fieldName in address Struct differ from the expected. They are: $addressStruct.type.fields.name" + // 3. assert that the second level fieldName in nestedArray keeps its fieldname fidelity def nestedArray = nestedFieldDto.jsonType.fields[2] assert nestedArray.type.elementType.fields[0].name == "FIELD1" : "The second level fieldName in nestedArray differ from the expected. They are: $addressStruct.type.fields.name"