Skip to content
Snippets Groups Projects
Commit 24596ff2 authored by Rosen Georgiev's avatar Rosen Georgiev
Browse files

added gitingore

parent 8b7d1e8b
Branches
No related tags found
1 merge request!13Attestation manager and fixes on Connection manager
{
"successful_creation": {
"name": "pizza_sandwich_290622-01",
"version": "29.06.2201",
"attributes": [
"fName",
"lName",
"gender"
],
"createdBy": "acceptsAnyString"
}
}
\ No newline at end of file
{
"successful_batch": {
"batch": {
"seal_id_1": "gAxtEAEaElNlbmRlclN0YXR1c09iamVjdA=="
}
},
"multiple_requests": {
"batch": {
"seal_id_1": "gAxtEAEaElNlbmRlclN0YXR1c09iamVjdA==",
"seal_id_2": "gAxtEAEaElNlbmRlclN0YXR1c09iamVjd233==",
"seal_id_3": "gAxtEAEaElNlbmRlclN0YXR1c09iamVjd234=="
}
},
"missing_batch": {
"seal_id_1": "gAxtEAEaElNlbmRlclN0YXR1c09iamVjdA=="
},
"not_base64_value": {
"batch": {
"seal_id_1": "dasdadasd"
}
},
"empty_seal_key": {
"batch": {
"": "gAxtEAEaElNlbmRlclN0YXR1c09iamVjdA=="
}
},
"empty_seal_value": {
"batch": {
"seal_id_1": ""
}
},
"missing_seal": {
"batch": {
}
},
"getStatuses_success": {
"key": "seal_id_1"
},
"getStatuses_missing_key": {
"": "seal_id_1"
},
"getStatuses_missing_value": {
"key": ""
},
"getStatuses_empty": {
}
}
\ No newline at end of file
{
"title": "Root Schema",
"type": "object",
"required": [
"statusCode",
"message",
"data"
],
"properties": {
"statusCode": {
"title": "The statusCode Schema",
"type": "integer"
},
"message": {
"title": "The message Schema",
"type": "string"
},
"data": {
"title": "The data Schema",
"type": "object",
"required": [
"count",
"records"
],
"properties": {
"count": {
"title": "The count Schema",
"type": "integer"
},
"records": {
"title": "The records Schema",
"type": "array",
"items": {
"title": "A Schema",
"type": "object",
"required": [
"id",
"schemaID",
"name",
"createdBy",
"createdDate",
"updatedBy",
"updatedDate",
"attribute"
],
"properties": {
"id": {
"title": "The id Schema",
"type": "string"
},
"schemaID": {
"title": "The schemaID Schema",
"type": "string"
},
"name": {
"title": "The name Schema",
"type": "string"
},
"createdBy": {
"title": "The createdBy Schema",
"type": "string"
},
"createdDate": {
"title": "The createdDate Schema",
"type": "string"
},
"updatedBy": {
"title": "The updatedBy Schema",
"type": "string"
},
"updatedDate": {
"title": "The updatedDate Schema",
"type": "string"
},
"attribute": {
"title": "The attribute Schema",
"type": "array",
"items": {
"title": "A Schema",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"title": "The name Schema",
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
\ No newline at end of file
......@@ -27,6 +27,7 @@ import core.Request;
import core.Response;
import core.RestClient;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -51,4 +52,13 @@ public class AttestationStepDefinitions extends BaseStepDefinitions {
addRequest(currentRequest);
addResponse(response);
}
@Then("^I create a new schema via Attestation Manager in OCM api")
public void I_create_a_new_schema_via_Attestation_Manager_in_OCM_api() {
currentRequest.setPath("/attestation/v1/schemas");
Response response = RestClient.get(currentRequest);
addRequest(currentRequest);
addResponse(response);
}
}
\ No newline at end of file
#Copyright (c) 2018 Vereign AG [https://www.vereign.com]
#
#This is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as
#published by the Free Software Foundation, either version 3 of the
#License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU Affero General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#http://localhost/ocm/attestation/v1/schemas
#Author: Rosen Georgiev rosen.georgiev@vereign.com
@rest @all @ocm @attestation
Feature: API - OCM - attestation - v1 - schemas POST
It is used to create schema.
The schema is a template which defines the schema name,
version and the attributes and is used to define the credential definition.
Background:
Given we are testing the OCM Api
@schemas
Scenario: OCM - Attestation - Creation of a new Schema with attributes - Positive
Given I load the REST request {AttestationCreateSchemas.json} with profile {successful_creation}
Then I create a new schema via Attestation Manager in OCM api
Then the field {statusCode} contains the value {200}
And the status code should be {200}
And the response is valid according to the {Attestation_POST_schemas.json} REST schema
And the field {message} contains the value {Schemas fetch successfully}
And the field {$..name} contains the value {pizza_sandwich_290622-01}
And the field {$..attribute..name} contains the value {fName}
And the field {$..attribute..name} contains the value {lName}
And the field {$..attribute..name} contains the value {gender}
And the field {$..attribute..name} contains the value {expirationDate}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment