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 8a5903d752695fde395aeedf74886beada34cbb1..df3974355e97c3a49ee8bce1c24e94c3f3442fe5 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 @@ -50,6 +50,16 @@ public class SchemaToStorageFormatImplTest { testSingleFile("/converter/integration-tests/index_records_1.schema", "KIND_VAL"); } + @Test + public void integrationTestSchema2() { + testSingleFile("/converter/integration-tests/index_records_2.schema", "KIND_VAL"); + } + + @Test + public void integrationTestSchema3() { + testSingleFile("/converter/integration-tests/index_records_3.schema", "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_2.schema b/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema new file mode 100644 index 0000000000000000000000000000000000000000..47f2afdeec69897656ccff479735a593d7b3b5a3 --- /dev/null +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema @@ -0,0 +1,65 @@ +{ + "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" + }, + "InvalidInteger": { + "type": "integer" + } + } + } + ] + } + } +} diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema.res b/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema.res new file mode 100644 index 0000000000000000000000000000000000000000..2d272b735099a5d36d2e50a56b6da8e303f36e50 --- /dev/null +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema.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": "InvalidInteger", + "kind": "int" + } + ] +} \ No newline at end of file diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema b/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema new file mode 100644 index 0000000000000000000000000000000000000000..4b11c71a27aabf540833cefd31ecdbc1b54502b2 --- /dev/null +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema @@ -0,0 +1,26 @@ +{ + "properties": { + "data": { + "allOf": [ + { + "type": "object", + "properties": { + "GeoShape": { + "$ref": "#/definitions/geoJsonFeatureCollection", + "description": "The wellbore's position .", + "format": "core:dl:geopoint:1.0.0", + "title": "WGS 84 Position", + "type": "object", + "x-slb-aliasProperties": [ + "witsml:GeographicLocationWGS84" + ] + }, + "WellName": { + "type": "string" + } + } + } + ] + } + } +} diff --git a/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema.res b/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema.res new file mode 100644 index 0000000000000000000000000000000000000000..bc347c7d037542ca59243e5162bb7ec08e7af2da --- /dev/null +++ b/indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema.res @@ -0,0 +1,13 @@ +{ + "kind": "KIND_VAL", + "schema": [ + { + "path": "GeoShape", + "kind": "core:dl:geoshape:1.0.0" + }, + { + "path": "WellName", + "kind": "string" + } + ] +} \ No newline at end of file