Commit eb36f374 authored by Neha Sarda's avatar Neha Sarda Committed by ethiraj krishnamanaidu
Browse files

Updated feature files and removed parent reference from schema test core

pom
parent 8f23f9d1
......@@ -62,11 +62,11 @@ Below command has to be run post building complete project.
cd testing/schema-test-core
mvn verify -DVENDOR=gcp -DHOST=https://open.opendes.cloud.slb-ds.com -DPRIVATE_TENANT1=opendes -DPRIVATE_TENANT2=tenant2 -DSHARED_TENANT=common -Dcucumber.options="--tags @SchemaService"
mvn verify -DVENDOR=gcp -DHOST=https://open.opendes.cloud.slb-ds.com -DPRIVATE_TENANT1=opendes -DPRIVATE_TENANT2=tenant2 -DSHARED_TENANT=common
Below command can be run through azure-pipeline.yml after setting environment variables in the pipeline.
verify "-Dcucumber.options=--tags @SchemaService"
verify
## Deploy Shared Schemas
Schema service as part of deployment deploys pre-defined OSDU schemas so end users can get community accepted schemas to refer. Such schemas are present in [folder](https://dev.azure.com/slb-des-ext-collaboration/open-data-ecosystem/_git/os-schema?path=%2Fdeployments%2Fshared-schemas%2Fosdu) and script to deploy the schema are present [here](https://dev.azure.com/slb-des-ext-collaboration/open-data-ecosystem/_git/os-schema?path=%2Fdeployments%2Fscripts).
......
......@@ -92,7 +92,7 @@ stages:
displayName: 'Running IntegrationTest'
inputs:
mavenPomFile: 'testing/schema-test-core/pom.xml'
goals: 'verify "-Dcucumber.options=--tags @SchemaService"'
goals: 'verify'
options: '--settings maven/settings.xml -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN)'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
......
......@@ -2,11 +2,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opengroup.osdu</groupId>
<artifactId>os-schema</artifactId>
<version>0.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>schema-test-core</artifactId>
......@@ -29,8 +29,6 @@
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
<version>0.0.1</version>
</dependency>
......@@ -68,7 +66,7 @@
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
......@@ -86,47 +84,20 @@
<artifactId>os-core-lib-aws</artifactId>
<version>0.3.7</version>
</dependency>
<dependency>
<groupId>org.opengroup.osdu</groupId>
<artifactId>os-core-lib-ibm</artifactId>
<version>${os-core-lib-ibm.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>org.opengroup.osdu.schema.runner.SchemaServiceTestsRunner</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!--This runs the tests thrice-->
<!--<build>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>pre-integration-test</id>
......@@ -176,5 +147,5 @@
</executions>
</plugin>
</plugins>
</build>-->
</build>
</project>
\ No newline at end of file
......@@ -48,6 +48,7 @@ public class TestConstants {
public static final String USER = "user";
public static final String STORAGE_SCHEMA_USER_EMAIL = "testUserEmail@test.com";
public static final String KIND = "kind";
public static final String TRUE = "true";
public static final String HOST = System.getProperty("HOST", System.getenv("HOST"));
public static final String PRIVATE_TENANT1 = System.getProperty("PRIVATE_TENANT1", System.getenv("PRIVATE_TENANT1"));
public static final String PRIVATE_TENANT2 = System.getProperty("PRIVATE_TENANT2", System.getenv("PRIVATE_TENANT2"));
......
......@@ -10,7 +10,7 @@ import java.util.Map;
import java.util.TreeSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.Assert;
import org.opengroup.osdu.schema.constants.TestConstants;
import org.opengroup.osdu.schema.stepdefs.model.HttpRequest;
import org.opengroup.osdu.schema.stepdefs.model.HttpResponse;
......@@ -56,14 +56,32 @@ public class SchemaServiceStepDef_GET implements En {
}
});
Given("I get latest schema with authority, source, entityType as {string}, {string}, {string} respectively",
(String authority, String source, String entityType) -> {
Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put(TestConstants.AUTHORITY, authority);
queryParams.put(TestConstants.SOURCE, source);
queryParams.put(TestConstants.ENTITY_TYPE, entityType);
queryParams.put(TestConstants.LATEST_VERSION, TestConstants.TRUE);
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);
assertEquals("200", String.valueOf(response.getCode()));
LOGGER.log(Level.INFO, "resp - " + response.toString());
verifyGetListResponse(TestConstants.AUTHORITY, authority);
});
Given("I hit schema service GET List API with {string} , {string} , {string}",
(String parameter, String parameterVal, String latestVersion) -> {
Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put(parameter, parameterVal);
queryParams.put("latestVersion", latestVersion);
HttpRequest httpRequest = HttpRequest.builder().url(TestConstants.HOST + TestConstants.GET_LIST_ENDPOINT)
.queryParams(queryParams).httpMethod(HttpRequest.GET)
.requestHeaders(this.context.getAuthHeaders()).build();
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);
assertEquals("200", String.valueOf(response.getCode()));
......@@ -103,9 +121,9 @@ public class SchemaServiceStepDef_GET implements En {
queryParams.put(TestConstants.LATEST_VERSION, latestVersion);
this.context.setQueryParams(queryParams);
HttpRequest httpRequest = HttpRequest.builder().url(TestConstants.HOST + TestConstants.GET_LIST_ENDPOINT)
.queryParams(queryParams).httpMethod(HttpRequest.GET)
.requestHeaders(this.context.getAuthHeaders()).build();
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);
});
......@@ -123,8 +141,9 @@ public class SchemaServiceStepDef_GET implements En {
});
Given("I hit schema service GET API with {string}", (String schemaId) -> {
HttpRequest httpRequest = HttpRequest.builder().url(TestConstants.HOST + TestConstants.GET_ENDPOINT + schemaId)
.httpMethod(HttpRequest.GET).requestHeaders(this.context.getAuthHeaders()).build();
HttpRequest httpRequest = HttpRequest.builder()
.url(TestConstants.HOST + TestConstants.GET_ENDPOINT + schemaId).httpMethod(HttpRequest.GET)
.requestHeaders(this.context.getAuthHeaders()).build();
HttpResponse response = HttpClientFactory.getInstance().send(httpRequest);
this.context.setHttpResponse(response);
});
......@@ -154,7 +173,8 @@ public class SchemaServiceStepDef_GET implements En {
Map<String, String> authHeaders = this.context.getAuthHeaders();
authHeaders.put(TestConstants.DATA_PARTITION_ID, otherTenant);
HttpRequest httpRequest = HttpRequest.builder()
.url(TestConstants.HOST + TestConstants.GET_ENDPOINT + this.context.getSchemaIdFromInputPayload())
.url(TestConstants.HOST + TestConstants.GET_ENDPOINT
+ this.context.getSchemaIdFromInputPayload())
.httpMethod(HttpRequest.GET).requestHeaders(authHeaders).build();
HttpResponse response = HttpClientFactory.getInstance().send(httpRequest);
this.context.setHttpResponse(response);
......@@ -173,7 +193,8 @@ public class SchemaServiceStepDef_GET implements En {
Then("schema service should respond back with {string} and {string}",
(String ReponseStatusCode, String ResponseToBeVerified) -> {
HttpRequest httpRequest = HttpRequest.builder()
.url(TestConstants.HOST + TestConstants.GET_ENDPOINT + this.context.getSchemaIdFromInputPayload())
.url(TestConstants.HOST + TestConstants.GET_ENDPOINT
+ this.context.getSchemaIdFromInputPayload())
.httpMethod(HttpRequest.GET).requestHeaders(this.context.getAuthHeaders()).build();
HttpResponse response = HttpClientFactory.getInstance().send(httpRequest);
assertEquals(ReponseStatusCode, String.valueOf(response.getCode()));
......@@ -191,9 +212,9 @@ public class SchemaServiceStepDef_GET implements En {
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();
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);
});
......@@ -252,9 +273,9 @@ public class SchemaServiceStepDef_GET implements En {
}
this.context.setQueryParams(queryParams);
HttpRequest httpRequest = HttpRequest.builder().url(TestConstants.HOST + TestConstants.GET_LIST_ENDPOINT)
.queryParams(queryParams).httpMethod(HttpRequest.GET)
.requestHeaders(this.context.getAuthHeaders()).build();
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);
});
......@@ -389,6 +410,7 @@ public class SchemaServiceStepDef_GET implements En {
verifyResponseJsonElement(key, value, root);
});
}
private String selectTenant(String tenant) {
switch (tenant) {
......
......@@ -3,7 +3,7 @@ Feature: To verify functionality of POST schema Service
### Commons test steps are accomplished here
Background: Common steps for all tests are executed
Given I generate user token and set request headers for "TENANT1"
Given I hit schema service GET List API with "authority" , "SchemaSanityTest" , "true"
Given I get latest schema with authority, source, entityType as "SchemaSanityTest", "testSource", "testEntity" respectively
Given I hit schema service POST API with "/input_payloads/postInPrivateScope_positiveScenario.json" and data-partition-id as "TENANT1" only if status is not development
@SchemaService
......@@ -13,8 +13,8 @@ Feature: To verify functionality of POST schema Service
And schema service should respond back with <ReponseStatusCodeForGET> and <ResponseMessageforGET>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForGET | ResponseMessageforGET |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "/output_payloads/ResolvedSchema_Empty.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForGET | ResponseMessageforGET |
| "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "/output_payloads/ResolvedSchema_Empty.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's POST API responds as bad request for wrong value of $ref attribute in schema input
......@@ -22,9 +22,9 @@ Feature: To verify functionality of POST schema Service
Then service should respond back with error <ReponseStatusCode> and <ResponseMessage>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_InvalidRefSchemaObject.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidRefSchemaObject.json" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_RefNotResolvable.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_RefNotResolvable.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "/input_payloads/postSchema_InvalidRefSchemaObject.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidRefSchemaObject.json" |
| "/input_payloads/postSchema_RefNotResolvable.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_RefNotResolvable.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's POST API registers unique scehma only.
......@@ -47,14 +47,11 @@ Feature: To verify functionality of POST schema Service
@SchemaService
Scenario Outline: Verify that Schema Service's POST API registers authority, source, entity and creates a private schema correctly with $ref attribute
Given I hit schema service POST API with <InputPayload> and data-partition-id as <tenant>
Then service should respond back with <ReponseStatusCode> and <ResponseMessage> and scope whould be <responceScope>
Then service should respond back with <ReponseStatusCode> and <ResponseMessage> and scope whould be <responseScope>
# And I GET updated schema
# And I get response <resourceNotFoundResponseCode> when I try to get schema from <otherTenant> other than from where it was ingested
Examples:
| parameter | value | latestVersion | InputPayload | tenant | otherTenant | ReponseStatusCode | resourceNotFoundResponseCode | ResponseMessage | responceScope |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "COMMON" | "TENANT1" | "201" | "404" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "SHARED" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "TENANT1" | "COMMON" | "201" | "404" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "INTERNAL" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage | responseScope |
| "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "INTERNAL" |
@SchemaService
Scenario Outline: Verify that Schema Service's POST API throws correct error if input payload is not valid
......@@ -62,9 +59,9 @@ Feature: To verify functionality of POST schema Service
Then service should respond back with error <ReponseStatusCode> and <ResponseMessage>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_withEntityAttributeInPayload.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_EntityNotAllowedError.json" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_flattenedSchemaAsInput.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidInputSchemaError.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "/input_payloads/postSchema_withEntityAttributeInPayload.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_EntityNotAllowedError.json" |
| "/input_payloads/postSchema_flattenedSchemaAsInput.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidInputSchemaError.json" |
@SchemaService
Scenario Outline: Verify that Schema Service supersededBy functionality work correctly
......@@ -72,8 +69,8 @@ Feature: To verify functionality of POST schema Service
Then the post service for supersededBy should respond back with <ReponseStatusCode> and <ResponseMessage>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/supercededInputPayload_positive.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "/input_payloads/supercededInputPayload_positive.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" |
@SchemaService
Scenario Outline: Verify whether schema can not be registered with already existing major, but increased minor version
......
......@@ -3,7 +3,7 @@ Feature: To verify functionality of PUT schema Service
### Commons test steps are accomplished here
Background: Common steps for all tests are executed
Given I generate user token and set request headers for "TENANT1"
Given I hit schema service GET List API with "authority" , "SchemaSanityTest" , "true"
Given I get latest schema with authority, source, entityType as "SchemaSanityTest", "testSource", "testEntity" respectively
Given I hit schema service POST API with "/input_payloads/postInPrivateScope_positiveScenario.json" and data-partition-id as "TENANT1" only if status is not development
@SchemaService
......@@ -13,8 +13,8 @@ Feature: To verify functionality of PUT schema Service
And schema service should respond back with <ReponseStatusCodeForGET> and <ResponseMessageforGET>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForPUT | ReponseStatusCodeForGET | ResponseMessageforGET |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postInPrivateScope_positiveScenario.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "200" | "/output_payloads/ResolvedSchema.json" |
| InputPayload | tenant | ReponseStatusCodeForPUT | ReponseStatusCodeForGET | ResponseMessageforGET |
| "/input_payloads/postInPrivateScope_positiveScenario.json" | "TENANT1" | "200" | "200" | "/output_payloads/ResolvedSchema.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API works correctly and update schema properly
......@@ -25,8 +25,8 @@ Feature: To verify functionality of PUT schema Service
And schema service should respond back with <ReponseStatusCodeForGET> and <ResponseMessageforGET>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForPUT | ReponseStatusCodeForGET | ResponseMessageforGET | UpdatedInputPayload |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postInPrivateScope_positiveScenario.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "200" | "/output_payloads/UpdatedResolvedSchema.json" | "/input_payloads/putUpdatedSchema_positiveScenario.json" |
| InputPayload | tenant | ReponseStatusCodeForPUT | ReponseStatusCodeForGET | ResponseMessageforGET | UpdatedInputPayload |
| "/input_payloads/postInPrivateScope_positiveScenario.json" | "TENANT1" | "200" | "200" | "/output_payloads/UpdatedResolvedSchema.json" | "/input_payloads/putUpdatedSchema_positiveScenario.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API throws error if update is requested for schema which is not in development status.
......@@ -46,8 +46,8 @@ Feature: To verify functionality of PUT schema Service
And schema service should respond back with <ReponseStatusCodeForGET> and <ResponseMessageforGET>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForPUT | ReponseStatusCodeForGET | ResponseMessageforGET |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postInPrivateScope_positiveScenario.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "201" | "200" | "/output_payloads/ResolvedSchema.json" |
| InputPayload | tenant | ReponseStatusCodeForPUT | ReponseStatusCodeForGET | ResponseMessageforGET |
| "/input_payloads/postInPrivateScope_positiveScenario.json" | "TENANT1" | "201" | "200" | "/output_payloads/ResolvedSchema.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API throws error if put request tries to create new record without development status
......@@ -66,8 +66,8 @@ Feature: To verify functionality of PUT schema Service
And schema service should respond back with <ReponseStatusCodeForGET> and <ResponseMessageforGET>
Examples:
| InputPayload | tenant | ReponseStatusCodeForPUT | ResponseMessage | ReponseStatusCodeForGET | ResponseMessageforGET |
| "/input_payloads/PUT_ModifySchemaInfo.json" | "TENANT1" | "201" | "/output_payloads/SchemaPut_SchemaInfoModification.json" | "200" | "/output_payloads/ResolvedSchema.json" |
| InputPayload | tenant | ReponseStatusCodeForPUT | ReponseStatusCodeForGET | ResponseMessageforGET |
| "/input_payloads/PUT_ModifySchemaInfo.json" | "TENANT1" | "201" | "200" | "/output_payloads/ResolvedSchema.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API validates input payload
......@@ -85,8 +85,8 @@ Feature: To verify functionality of PUT schema Service
And schema service should respond back with <ReponseStatusCodeForGET> and <ResponseMessageforGET>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForGET | ResponseMessageforGET |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "200" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "/output_payloads/ResolvedSchema_Empty.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForGET | ResponseMessageforGET |
| "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "200" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "/output_payloads/ResolvedSchema_Empty.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API creates a empty private schema correctly.
......@@ -95,8 +95,8 @@ Feature: To verify functionality of PUT schema Service
And schema service should respond back with <ReponseStatusCodeForGET> and <ResponseMessageforGET>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForGET | ResponseMessageforGET |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "/output_payloads/ResolvedSchema_Empty.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage | ReponseStatusCodeForGET | ResponseMessageforGET |
| "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "200" | "/output_payloads/ResolvedSchema_Empty.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API responds as bad request for wrong value of $ref attribute in schema input
......@@ -104,9 +104,9 @@ Feature: To verify functionality of PUT schema Service
Then service should respond back with error <ReponseStatusCode> and <ResponseMessage>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_InvalidRefSchemaObject.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidRefSchemaObject.json" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_RefNotResolvable.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_RefNotResolvable.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "/input_payloads/postSchema_InvalidRefSchemaObject.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidRefSchemaObject.json" |
| "/input_payloads/postSchema_RefNotResolvable.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_RefNotResolvable.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API responds as bad request for wrong value of $ref attribute in schema input
......@@ -114,9 +114,9 @@ Feature: To verify functionality of PUT schema Service
Then service should respond back with error <ReponseStatusCode> and <ResponseMessage>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_InvalidRefSchemaObject.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidRefSchemaObject.json" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_RefNotResolvable.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_RefNotResolvable.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "/input_payloads/postSchema_InvalidRefSchemaObject.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidRefSchemaObject.json" |
| "/input_payloads/postSchema_RefNotResolvable.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_RefNotResolvable.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API validates input payload for JSON correctness
......@@ -141,24 +141,18 @@ Feature: To verify functionality of PUT schema Service
Given I hit schema service PUT API with <InputPayload>, data-partition-id as <tenant>
Then service should respond back with <ReponseStatusCode> and <ResponseMessage> and scope whould be <responceScope>
# And I GET updated schema
# And I get response <resourceNotFoundResponseCode> when I try to get schema from <otherTenant> other than from where it was ingested
Examples:
| parameter | value | latestVersion | InputPayload | tenant | otherTenant | ReponseStatusCode | resourceNotFoundResponseCode | ResponseMessage | responceScope |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "COMMON" | "TENANT1" | "200" | "404" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "SHARED" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "TENANT1" | "COMMON" | "200" | "404" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "INTERNAL" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage | responceScope |
| "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "TENANT1" | "200" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "INTERNAL" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API registers authority, source, entity and creates a private schema correctly with $ref attribute
Given I hit schema service PUT API with <InputPayload>, data-partition-id as <tenant> with next major version
Then service should respond back with <ReponseStatusCode> and <ResponseMessage> and scope whould be <responceScope>
# And I GET updated schema
# And I get response <resourceNotFoundResponseCode> when I try to get schema from <otherTenant> other than from where it was ingested
Examples:
| parameter | value | latestVersion | InputPayload | tenant | otherTenant | ReponseStatusCode | resourceNotFoundResponseCode | ResponseMessage | responceScope |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "COMMON" | "TENANT1" | "201" | "404" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "SHARED" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "TENANT1" | "COMMON" | "201" | "404" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "INTERNAL" |
| parameter | value | latestVersion | InputPayload | tenant | otherTenant | ReponseStatusCode | ResponseMessage | responceScope |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaServiceWithRef_positiveScenario.json" | "TENANT1" | "COMMON" | "201" | "/output_payloads/SchemaPost_PrivateScope_SuccessfulCreation.json" | "INTERNAL" |
@SchemaService
Scenario Outline: Verify that create Schema Service supersededBy functionality work correctly
......@@ -166,8 +160,8 @@ Feature: To verify functionality of PUT schema Service
Then the put service for supersededBy should respond back with <ReponseStatusCode>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/supercededInputPayload_positive.json" | "TENANT1" | "201" |
| InputPayload | tenant | ReponseStatusCode |
| "/input_payloads/supercededInputPayload_positive.json" | "TENANT1" | "201" |
@SchemaService
Scenario Outline: Verify that update Schema Service supersededBy functionality work correctly
......@@ -175,8 +169,8 @@ Feature: To verify functionality of PUT schema Service
Then the put service for supersededBy should respond back with <ReponseStatusCode>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "200" |
| InputPayload | tenant | ReponseStatusCode |
| "/input_payloads/postSchemaService_EmptySchema.json" | "TENANT1" | "200" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API throws correct error if input payload is not valid
......@@ -184,9 +178,9 @@ Feature: To verify functionality of PUT schema Service
Then service should respond back with error <ReponseStatusCode> and <ResponseMessage>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_withEntityAttributeInPayload.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_EntityNotAllowedError.json" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_flattenedSchemaAsInput.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidInputSchemaError.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "/input_payloads/postSchema_withEntityAttributeInPayload.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_EntityNotAllowedError.json" |
| "/input_payloads/postSchema_flattenedSchemaAsInput.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidInputSchemaError.json" |
@SchemaService
Scenario Outline: Verify that Schema Service's PUT API throws correct error if input payload is not valid
......@@ -194,9 +188,9 @@ Feature: To verify functionality of PUT schema Service
Then service should respond back with error <ReponseStatusCode> and <ResponseMessage>
Examples:
| parameter | value | latestVersion | InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_withEntityAttributeInPayload.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_EntityNotAllowedError.json" |
| "authority" | "SchemaSanityTest" | "true" | "/input_payloads/postSchema_flattenedSchemaAsInput.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidInputSchemaError.json" |
| InputPayload | tenant | ReponseStatusCode | ResponseMessage |
| "/input_payloads/postSchema_withEntityAttributeInPayload.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_EntityNotAllowedError.json" |
| "/input_payloads/postSchema_flattenedSchemaAsInput.json" | "TENANT1" | "400" | "/output_payloads/PostSchema_InvalidInputSchemaError.json" |
@SchemaService
Scenario Outline: Verify whether schema can not be registered with already existing major, but increased minor version
......
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