diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/DeleteSchemaSteps.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/DeleteSchemaSteps.java index 852c37714818df3cf8bc157522d7aa758bfdb5eb..ee9ef9489436e73c44bb3a94aa0bf7dc5bf2d912 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/DeleteSchemaSteps.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/DeleteSchemaSteps.java @@ -45,7 +45,8 @@ public class DeleteSchemaSteps extends TestsBase { public void the_elastic_search_is_initialized_with_the_following_data(DataTable dataTable) throws Throwable { List<Setup> inputlist = dataTable.asList(Setup.class); for (Setup input : inputlist) { - TestIndex testIndex = new TestIndex(httpClient); + TestIndex testIndex = new TestIndex(); + testIndex.setHttpClient(httpClient); testIndex.setIndex(generateActualName(input.getIndex(), timeStamp)); testIndex.setKind(generateActualName(input.getKind(), timeStamp)); testIndex.setMappingFile(input.getMappingFile()); diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/GetSchemaSteps.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/GetSchemaSteps.java index 8d64b372b4986ab874d9a42baa709c2276282767..2409f143d9632a5ddcf4b9c40700db785b35b7e7 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/GetSchemaSteps.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/GetSchemaSteps.java @@ -44,7 +44,8 @@ public class GetSchemaSteps extends TestsBase { public void the_elastic_search_is_initialized_with_the_following_data(DataTable dataTable) throws Throwable { List<Setup> inputlist = dataTable.asList(Setup.class); for (Setup input : inputlist) { - TestIndex testIndex = new TestIndex(httpClient); + TestIndex testIndex = new TestIndex(); + testIndex.setHttpClient(httpClient); testIndex.setIndex(generateActualName(input.getIndex(), timeStamp)); testIndex.setKind(generateActualName(input.getKind(), timeStamp)); testIndex.setMappingFile(input.getMappingFile()); diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java index 6dab767b4059dfe03b12ae7f9ceda71277b73457..5efabdd50bdd374a70270613384dabcdbad26c8d 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/RecordSteps.java @@ -34,7 +34,6 @@ public class RecordSteps extends TestsBase { private boolean shutDownHookAdded = false; private String timeStamp; - private HTTPClient httpClient; private List<Map<String, Object>> records; private Map<String, String> headers; @@ -64,7 +63,8 @@ public class RecordSteps extends TestsBase { List<Setup> inputList = dataTable.asList(Setup.class); for (Setup input : inputList) { - TestIndex testIndex = new TestIndex(httpClient); + TestIndex testIndex = new TestIndex(); + testIndex.setHttpClient(httpClient); testIndex.setIndex(generateActualName(input.getIndex(), timeStamp)); testIndex.setKind(generateActualName(input.getKind(), timeStamp)); testIndex.setSchemaFile(input.getSchemaFile()); diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/TestsBase.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/TestsBase.java index cec039883ba6a29a95480ce1b61059e0f46812ef..ec4b136b356b1513e91ceb0e718e54e0a6b06d70 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/TestsBase.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/common/TestsBase.java @@ -39,6 +39,7 @@ public abstract class TestsBase { protected void setUp(List<Setup> inputList, String timeStamp) { for (Setup input : inputList) { TestIndex testIndex = new TestIndex(); + testIndex.setHttpClient(httpClient); testIndex.setIndex(generateActualName(input.getIndex(), timeStamp)); testIndex.setKind(generateActualName(input.getKind(), timeStamp)); testIndex.setMappingFile(input.getMappingFile()); diff --git a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/models/TestIndex.java b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/models/TestIndex.java index 6b24a221177529826170142aa58edfc7562bc73e..b87213d09b0f712f9be30d1836b091d304181d9a 100644 --- a/testing/indexer-test-core/src/main/java/org/opengroup/osdu/models/TestIndex.java +++ b/testing/indexer-test-core/src/main/java/org/opengroup/osdu/models/TestIndex.java @@ -35,12 +35,13 @@ public class TestIndex { private String[] viewerGroup; private String[] ownerGroup; private HTTPClient httpClient; - private Map<String, String> headers = httpClient.getCommonHeader(); + private Map<String, String> headers; private ElasticUtils elasticUtils = new ElasticUtils(); private Gson gson = new Gson(); - public TestIndex(HTTPClient httpClient) { + public void setHttpClient(HTTPClient httpClient) { this.httpClient = httpClient; + headers = httpClient.getCommonHeader(); } public void setupIndex() { diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/deleteschema/Steps.java b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/deleteschema/Steps.java index 02b01b12baeb5c6d9a08c4dd4fd0bc9ecce00eea..344d597375249c43a2db50cea58ec6177e1346d3 100644 --- a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/deleteschema/Steps.java +++ b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/deleteschema/Steps.java @@ -21,6 +21,7 @@ public class Steps extends DeleteSchemaSteps { @Before public void before(Scenario scenario) { this.scenario = scenario; + this.httpClient = new GCPHTTPClient(); } @Given("^the elastic search is initialized with the following data$") diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/getschema/Steps.java b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/getschema/Steps.java index 18213f98f097e4ee60741ab167ea27fb7f9dc372..349f6163f72cf6719526e011c210a8f55a0596a0 100644 --- a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/getschema/Steps.java +++ b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/getschema/Steps.java @@ -18,6 +18,7 @@ public class Steps extends GetSchemaSteps { @Before public void before(Scenario scenario) { this.scenario = scenario; + this.httpClient = new GCPHTTPClient(); } @Given("^the elastic search is initialized with the following data$") diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/mapping/Steps.java b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/mapping/Steps.java index 561f3f29934457fdb27b43c03516448046be1b5e..13ed238141d4df089d2427476ca9f5c0548a1978 100644 --- a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/mapping/Steps.java +++ b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/mapping/Steps.java @@ -23,6 +23,7 @@ public class Steps extends MappingSteps { @Before public void before(Scenario scenario) { this.scenario = scenario; + this.httpClient = new GCPHTTPClient(); } @Given("^the elastic search is initialized with the following data$") diff --git a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java index f3c64bc9856f37b39d26983cfb78ac862a119ccc..348474e7769bb54d2362d079ad9aa093760d6fa2 100644 --- a/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java +++ b/testing/indexer-test-gcp/src/test/java/org/opengroup/osdu/step_definitions/index/record/Steps.java @@ -21,6 +21,7 @@ public class Steps extends RecordSteps { @Before public void before(Scenario scenario) { this.scenario = scenario; + this.httpClient = new GCPHTTPClient(); } @Given("^the schema is created with the following kind$") diff --git a/testing/indexer-test-core/src/main/resources/features/delete/Delete.feature b/testing/indexer-test-gcp/src/test/resources/features/delete/Delete.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/delete/Delete.feature rename to testing/indexer-test-gcp/src/test/resources/features/delete/Delete.feature diff --git a/testing/indexer-test-core/src/main/resources/features/indexrecord/IndexRecord.feature b/testing/indexer-test-gcp/src/test/resources/features/indexrecord/IndexRecord.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/indexrecord/IndexRecord.feature rename to testing/indexer-test-gcp/src/test/resources/features/indexrecord/IndexRecord.feature diff --git a/testing/indexer-test-core/src/main/resources/features/kindschema/KindSchema.feature b/testing/indexer-test-gcp/src/test/resources/features/kindschema/KindSchema.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/kindschema/KindSchema.feature rename to testing/indexer-test-gcp/src/test/resources/features/kindschema/KindSchema.feature diff --git a/testing/indexer-test-core/src/main/resources/features/query/crosscluster/Query.feature b/testing/indexer-test-gcp/src/test/resources/features/query/crosscluster/Query.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/query/crosscluster/Query.feature rename to testing/indexer-test-gcp/src/test/resources/features/query/crosscluster/Query.feature diff --git a/testing/indexer-test-core/src/main/resources/features/query/singlecluster/Query.feature b/testing/indexer-test-gcp/src/test/resources/features/query/singlecluster/Query.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/query/singlecluster/Query.feature rename to testing/indexer-test-gcp/src/test/resources/features/query/singlecluster/Query.feature diff --git a/testing/indexer-test-core/src/main/resources/features/querybycursor/crosscluster/QueryByCursor.feature b/testing/indexer-test-gcp/src/test/resources/features/querybycursor/crosscluster/QueryByCursor.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/querybycursor/crosscluster/QueryByCursor.feature rename to testing/indexer-test-gcp/src/test/resources/features/querybycursor/crosscluster/QueryByCursor.feature diff --git a/testing/indexer-test-core/src/main/resources/features/querybycursor/singlecluster/QueryByCursor.feature b/testing/indexer-test-gcp/src/test/resources/features/querybycursor/singlecluster/QueryByCursor.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/querybycursor/singlecluster/QueryByCursor.feature rename to testing/indexer-test-gcp/src/test/resources/features/querybycursor/singlecluster/QueryByCursor.feature diff --git a/testing/indexer-test-core/src/main/resources/features/smart/parser/SmartParser.feature b/testing/indexer-test-gcp/src/test/resources/features/smart/parser/SmartParser.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/smart/parser/SmartParser.feature rename to testing/indexer-test-gcp/src/test/resources/features/smart/parser/SmartParser.feature diff --git a/testing/indexer-test-core/src/main/resources/features/smart/search/Smart.feature b/testing/indexer-test-gcp/src/test/resources/features/smart/search/Smart.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/smart/search/Smart.feature rename to testing/indexer-test-gcp/src/test/resources/features/smart/search/Smart.feature diff --git a/testing/indexer-test-core/src/main/resources/features/updateindex/UpdateIndexMapping.feature b/testing/indexer-test-gcp/src/test/resources/features/updateindex/UpdateIndexMapping.feature similarity index 100% rename from testing/indexer-test-core/src/main/resources/features/updateindex/UpdateIndexMapping.feature rename to testing/indexer-test-gcp/src/test/resources/features/updateindex/UpdateIndexMapping.feature diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_1.json b/testing/indexer-test-gcp/src/test/resources/testData/index_records_1.json similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/index_records_1.json rename to testing/indexer-test-gcp/src/test/resources/testData/index_records_1.json diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_1.schema b/testing/indexer-test-gcp/src/test/resources/testData/index_records_1.schema similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/index_records_1.schema rename to testing/indexer-test-gcp/src/test/resources/testData/index_records_1.schema diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_2.json b/testing/indexer-test-gcp/src/test/resources/testData/index_records_2.json similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/index_records_2.json rename to testing/indexer-test-gcp/src/test/resources/testData/index_records_2.json diff --git a/testing/indexer-test-core/src/main/resources/testData/index_records_2.schema b/testing/indexer-test-gcp/src/test/resources/testData/index_records_2.schema similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/index_records_2.schema rename to testing/indexer-test-gcp/src/test/resources/testData/index_records_2.schema diff --git a/testing/indexer-test-core/src/main/resources/testData/records_1.json b/testing/indexer-test-gcp/src/test/resources/testData/records_1.json similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/records_1.json rename to testing/indexer-test-gcp/src/test/resources/testData/records_1.json diff --git a/testing/indexer-test-core/src/main/resources/testData/records_1.mapping b/testing/indexer-test-gcp/src/test/resources/testData/records_1.mapping similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/records_1.mapping rename to testing/indexer-test-gcp/src/test/resources/testData/records_1.mapping diff --git a/testing/indexer-test-core/src/main/resources/testData/records_2.json b/testing/indexer-test-gcp/src/test/resources/testData/records_2.json similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/records_2.json rename to testing/indexer-test-gcp/src/test/resources/testData/records_2.json diff --git a/testing/indexer-test-core/src/main/resources/testData/records_2.mapping b/testing/indexer-test-gcp/src/test/resources/testData/records_2.mapping similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/records_2.mapping rename to testing/indexer-test-gcp/src/test/resources/testData/records_2.mapping diff --git a/testing/indexer-test-core/src/main/resources/testData/records_3.json b/testing/indexer-test-gcp/src/test/resources/testData/records_3.json similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/records_3.json rename to testing/indexer-test-gcp/src/test/resources/testData/records_3.json diff --git a/testing/indexer-test-core/src/main/resources/testData/records_3.mapping b/testing/indexer-test-gcp/src/test/resources/testData/records_3.mapping similarity index 100% rename from testing/indexer-test-core/src/main/resources/testData/records_3.mapping rename to testing/indexer-test-gcp/src/test/resources/testData/records_3.mapping