diff --git a/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java b/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java index 56656c2dd296d9550e5a9c27a3df7a01160fb8aa..8009de87d4e6c7f4a138d560e0bc58c650520c21 100644 --- a/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java +++ b/indexer-core/src/test/java/org/opengroup/osdu/indexer/schema/converter/SchemaToStorageFormatImplTest.java @@ -45,6 +45,11 @@ public class SchemaToStorageFormatImplTest { testSingleFile("/converter/first/schema.json", "osdu:osdu:Wellbore:1.0.0"); } + @Test + public void integrationTestSchema1() { + testSingleFile("/converter/integration-tests/index_records_1.json", "KIND_VAL"); + } + @Test public void wkeSchemaPassed() { testSingleFile("/converter/wks/slb_wke_wellbore.json", "slb:wks:wellbore:1.0.6"); diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_1.json b/indexer-core/src/test/resources/converter/integration-tests/index_records_1.json new file mode 100644 index 0000000000000000000000000000000000000000..bdbfd7a21bcd931c9401681398a6737d7a730827 --- /dev/null +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_1.json @@ -0,0 +1,70 @@ +{ + "properties": { + "data": { + "allOf": [ + { + "type": "object", + "properties": { + "Field": { + "type": "string" + }, + "Location": { + "$ref": "#/definitions/core_dl_geopoint", + "description": "The wellbore's position .", + "format": "core:dl:geopoint:1.0.0", + "title": "WGS 84 Position", + "type": "object", + "x-slb-aliasProperties": [ + "witsml:GeographicLocationWGS84" + ] + }, + "Basin": { + "type": "string" + }, + "County": { + "type": "string" + }, + "State": { + "type": "string" + }, + "Country": { + "type": "string" + }, + "WellStatus": { + "type": "string" + }, + "OriginalOperator": { + "type": "string" + }, + "WellName": { + "type": "string" + }, + "WellType": { + "type": "string" + }, + "EmptyAttribute": { + "type": "string" + }, + "Rank": { + "type": "integer" + }, + "Score": { + "type": "integer" + }, + "Established": { + "type": "date-time" + }, + "DblArray": { + "description": "The name of the host [cloud environment] region(s) for this OSDU resource object.", + "title": "Resource Host Region ID", + "type": "array", + "items": { + "type": "number" + } + } + } + } + ] + } + } +} diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_1.json.res b/indexer-core/src/test/resources/converter/integration-tests/index_records_1.json.res new file mode 100644 index 0000000000000000000000000000000000000000..a67be0f5383d708571bcbc03b69cb7c818d860d4 --- /dev/null +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_1.json.res @@ -0,0 +1,65 @@ +{ + "kind": "KIND_VAL", + "schema": [ + { + "path": "Field", + "kind": "string" + }, + { + "path": "Location", + "kind": "core:dl:geopoint:1.0.0" + }, + { + "path": "Basin", + "kind": "string" + }, + { + "path": "County", + "kind": "string" + }, + { + "path": "State", + "kind": "string" + }, + { + "path": "Country", + "kind": "string" + }, + { + "path": "WellStatus", + "kind": "string" + }, + { + "path": "OriginalOperator", + "kind": "string" + }, + { + "path": "WellName", + "kind": "string" + }, + { + "path": "WellType", + "kind": "string" + }, + { + "path": "EmptyAttribute", + "kind": "string" + }, + { + "path": "Rank", + "kind": "int" + }, + { + "path": "Score", + "kind": "int" + }, + { + "path": "Established", + "kind": "datetime" + }, + { + "path": "DblArray", + "kind": "[]double" + } + ] +} \ No newline at end of file