From ea527e1b3f20566f0cd2cb2e570afbec07531306 Mon Sep 17 00:00:00 2001 From: Sviatoslav Nekhaienko <snekhaienko@slb.com> Date: Mon, 23 Nov 2020 15:47:43 +0200 Subject: [PATCH] revert provider changes exept Azure --- .../SchemaToStorageFormatImplTest.java | 10 +++ .../integration-tests/index_records_2.schema | 65 +++++++++++++++++++ .../index_records_2.schema.res | 65 +++++++++++++++++++ .../integration-tests/index_records_3.schema | 26 ++++++++ .../index_records_3.schema.res | 13 ++++ 5 files changed, 179 insertions(+) create mode 100644 indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema create mode 100644 indexer-core/src/test/resources/converter/integration-tests/index_records_2.schema.res create mode 100644 indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema create mode 100644 indexer-core/src/test/resources/converter/integration-tests/index_records_3.schema.res 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 8a5903d75..df3974355 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 000000000..47f2afdee --- /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 000000000..2d272b735 --- /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 000000000..4b11c71a2 --- /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 000000000..bc347c7d0 --- /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 -- GitLab