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 e425dcbe8..dd35e6453 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 @@ -226,62 +226,47 @@ class MetacatSmokeSpec extends Specification { // assert that the json representation keeps the name fidelity def expectedJsonString = """ - "fields": [ - { - "name": "name", - "type": "chararray" - }, - { - "name": "address", - "type": { - "type": "row", - "fields": [ - { - "name": "NAME", - "type": "chararray" - } - ] - } - }, - { - "name": "nestedArray", - "type": { - "type": "array", - "elementType": { + { + "type": "row", + "fields": [ + { + "name": "name", + "type": "chararray" + }, + { + "name": "address", + "type": { "type": "row", "fields": [ { - "name": "FIELD1", - "type": "chararray" - }, - { - "name": "field2", + "name": "NAME", "type": "chararray" } ] } + }, + { + "name": "nestedArray", + "type": { + "type": "array", + "elementType": { + "type": "row", + "fields": [ + { + "name": "FIELD1", + "type": "chararray" + }, + { + "name": "field2", + "type": "chararray" + } + ] + } + } } - } - ] - """ - - def parsedExpectedJson = jsonSlurper.parseText(expectedJsonString) - // Compare the JSON array result and the parsed expected JSON - assert nestedFieldDto.jsonType.fields == parsedExpectedJson : "The JSON array result differs from the expected JSON string" - - // 1. assert the first level fieldName fidelity - 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 = firstLevelFields[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 = firstLevelFields[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" - + ] + } + """ cleanup: api.deleteTable(catalogName, databaseName, tableName) }