Skip to content
Snippets Groups Projects
Commit 823bd746 authored by Gokul Nagare's avatar Gokul Nagare Committed by Anuj Gupta
Browse files

v3 feature file changes

parent 2a62637c
No related branches found
No related tags found
2 merge requests!150v3 feature file changes,!142Array of Objects support by Indexer (GONRG-2028)
...@@ -6,7 +6,7 @@ import org.junit.runner.RunWith; ...@@ -6,7 +6,7 @@ import org.junit.runner.RunWith;
@RunWith(Cucumber.class) @RunWith(Cucumber.class)
@CucumberOptions( @CucumberOptions(
features = {"classpath:features/indexrecord/IndexRecord.feature","classpath:apikey.feature"}, features = {"classpath:features/indexrecord/indexRecord-schema-service.feature","classpath:apikey.feature"},
glue = {"classpath:org.opengroup.osdu.step_definitions/index/record"}, glue = {"classpath:org.opengroup.osdu.step_definitions/index/record"},
plugin = {"pretty", "junit:target/cucumber-reports/TEST-indexrecord.xml"}) plugin = {"pretty", "junit:target/cucumber-reports/TEST-indexrecord.xml"})
public class RunTest { public class RunTest {
......
...@@ -8,6 +8,7 @@ import java.util.Map; ...@@ -8,6 +8,7 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.opengroup.osdu.common.RecordSteps; import org.opengroup.osdu.common.RecordSteps;
import org.opengroup.osdu.common.SchemaServiceRecordSteps;
import org.opengroup.osdu.core.common.Constants; import org.opengroup.osdu.core.common.Constants;
import org.opengroup.osdu.core.common.http.HttpClient; import org.opengroup.osdu.core.common.http.HttpClient;
import org.opengroup.osdu.core.common.http.HttpRequest; import org.opengroup.osdu.core.common.http.HttpRequest;
...@@ -16,6 +17,7 @@ import org.opengroup.osdu.core.common.model.http.AppError; ...@@ -16,6 +17,7 @@ import org.opengroup.osdu.core.common.model.http.AppError;
import org.opengroup.osdu.core.common.model.http.DpsHeaders; import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.core.common.model.search.RecordChangedMessages; import org.opengroup.osdu.core.common.model.search.RecordChangedMessages;
import org.opengroup.osdu.core.ibm.util.Config; import org.opengroup.osdu.core.ibm.util.Config;
import org.opengroup.osdu.util.ElasticUtils;
import org.opengroup.osdu.util.IBMHTTPClient; import org.opengroup.osdu.util.IBMHTTPClient;
import com.google.gson.Gson; import com.google.gson.Gson;
...@@ -29,10 +31,10 @@ import cucumber.api.java.en.When; ...@@ -29,10 +31,10 @@ import cucumber.api.java.en.When;
import lombok.extern.java.Log; import lombok.extern.java.Log;
@Log @Log
public class Steps extends RecordSteps { public class Steps extends SchemaServiceRecordSteps {
public Steps() { public Steps() {
super(new IBMHTTPClient()); super(new IBMHTTPClient(), new ElasticUtils());
} }
@Before @Before
...@@ -66,6 +68,38 @@ public class Steps extends RecordSteps { ...@@ -66,6 +68,38 @@ public class Steps extends RecordSteps {
super.iShouldGetTheNumberDocumentsForTheIndexInTheElasticSearchWithOutSkippedAttribute(expectedCount, index, skippedAttributes); super.iShouldGetTheNumberDocumentsForTheIndexInTheElasticSearchWithOutSkippedAttribute(expectedCount, index, skippedAttributes);
} }
@Then("^I should be able to search (\\d+) record with index \"([^\"]*)\" by tag \"([^\"]*)\" and value \"([^\"]*)\"$")
public void iShouldBeAbleToSearchRecordByTagKeyAndTagValue(int expectedNumber, String index, String tagKey, String tagValue) throws Throwable {
super.iShouldBeAbleToSearchRecordByTagKeyAndTagValue(index, tagKey, tagValue, expectedNumber);
}
@Then("^I should be able search (\\d+) documents for the \"([^\"]*)\" by bounding box query with points \\((-?\\d+), (-?\\d+)\\) and \\((-?\\d+), (-?\\d+)\\) on field \"(.*?)\"$")
public void i_should_get_the_documents_for_the_in_the_Elastic_Search_by_geoQuery (
int expectedCount, String index, Double topLatitude, Double topLongitude, Double bottomLatitude, Double bottomLongitude, String field) throws Throwable {
super.i_should_get_the_documents_for_the_in_the_Elastic_Search_by_geoQuery(expectedCount, index, topLatitude, topLongitude, bottomLatitude, bottomLongitude, field);
}
@Then("^I should be able search (\\d+) documents for the \"([^\"]*)\" by nested \"([^\"]*)\" and properties \\(\"([^\"]*)\", (\\d+)\\) and \\(\"([^\"]*)\", \"([^\"]*)\"\\)$")
public void i_should_get_the_documents_for_the_in_the_Elastic_Search_by_nestedQuery(
int expectedCount, String index, String path, String firstNestedProperty, String firstNestedValue, String secondNestedProperty,
String secondNestedValue) throws Throwable {
super.i_should_get_the_documents_for_the_in_the_Elastic_Search_by_nestedQuery(expectedCount, index, path, firstNestedProperty, firstNestedValue,
secondNestedProperty, secondNestedValue);
}
@Then("^I should be able search (\\d+) documents for the \"([^\"]*)\" by flattened inner properties \\(\"([^\"]*)\", \"([^\"]*)\"\\)$")
public void i_should_be_able_search_documents_for_the_by_flattened_inner_properties(int expectedCount, String index, String flattenedField,
String flattenedFieldValue) throws Throwable {
super.i_should_be_able_search_documents_for_the_by_flattened_inner_properties(expectedCount, index, flattenedField, flattenedFieldValue);
}
@Then("^I should get \"([^\"]*)\" in response, without hints in schema for the \"([^\"]*)\" that present in the \"([^\"]*)\" with \"([^\"]*)\" for a given \"([^\"]*)\"$")
public void i_should_get_object_in_search_response_without_hints_in_schema(String objectInnerField, String index, String recordFile, String acl, String kind)
throws Throwable {
super.i_should_get_object_in_search_response_without_hints_in_schema(objectInnerField ,index, recordFile, acl, kind);
}
@When("^I pass api key$") @When("^I pass api key$")
public void i_pass_the_api_key() { public void i_pass_the_api_key() {
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment