Commit c96c8e03 authored by Abhishek Kumar's avatar Abhishek Kumar
Browse files

Merge branch 'schema-offset-issue-slb' of...

Merge branch 'schema-offset-issue-slb' of https://community.opengroup.org/osdu/platform/system/schema-service.git into schema-offset-issue-slb
parents 109df75a 9d348cbe
Pipeline #66147 failed with stages
in 35 minutes and 4 seconds
......@@ -207,11 +207,11 @@ public class SchemaServiceStepDef_GET implements En {
JsonObject responseMsg = gsn.fromJson(response.getBody().toString(), JsonObject.class);
assertEquals(expectedData.toString(), responseMsg.toString());
});
Given("I hit schema service GET List API with {string} and {string}",
(String parameter, String parameterVal) -> {
//parameterVal = selectVersionFromInput(parameterVal);
parameterVal = selectVersionFromInput(parameterVal);
Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put(parameter, parameterVal);
......@@ -222,6 +222,17 @@ public class SchemaServiceStepDef_GET implements En {
this.context.setHttpResponse(response);
});
Given("I hit schema GET List API with {string} and {string}",
(String parameter, String parameterVal) -> {
Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put(parameter, parameterVal);
HttpRequest httpRequest = HttpRequest.builder()
.url(TestConstants.HOST + TestConstants.GET_LIST_ENDPOINT).queryParams(queryParams)
.httpMethod(HttpRequest.GET).requestHeaders(this.context.getAuthHeaders()).build();
HttpResponse response = HttpClientFactory.getInstance().send(httpRequest);
this.context.setHttpResponse(response);
});
Given("I hit schema service GET API with blank {string}", (String header) -> {
Map<String, String> authHeaders = this.context.getAuthHeaders();
......@@ -333,7 +344,7 @@ public class SchemaServiceStepDef_GET implements En {
}
id2 = getSchemaIdByNumber(firstschemaOffset);
LOGGER.info("ID1 : " + id1);
LOGGER.info("ID2 : " + id2);
LOGGER.info("ID : " + id2);
assertTrue("Offset validation is successful", id1.equals(id2) );
});
......
......@@ -99,7 +99,7 @@ Feature: To verify functionality of GET schema Service
@SchemaService
Scenario Outline: Verify that Schema Service's GET list API handles offset filter combinations elegantly with correct success messages
Given I hit schema service GET List API with <parameter> and <schemaOffset1>
Given I hit schema GET List API with <parameter> and <schemaOffset1>
Then service should respond back with status code <ReponseStatusCode> and note down id of <schemaOffset2>
When I hit schema service GET List API with <parameter> and <schemaOffset2>
Then service should respond back with status code <ReponseStatusCode> and note down id of <schemaOffset1> and compare with earlier id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment