Skip to content
Snippets Groups Projects
Unverified Commit 1481cbf3 authored by Georgi Michev's avatar Georgi Michev
Browse files

implement code reviw comments


Signed-off-by: default avatargeorgi.michev <georgi.michev@vereign.com>
parent cf4e1471
No related branches found
No related tags found
1 merge request!25add export and import for Infohub
......@@ -34,11 +34,6 @@ public class CacheStepDefinitions extends BaseStepDefinitions {
}
}
@And("^I get the result \\{(\\d+)\\} from Import IDs $")
public void iGetTheResultOfTask(int id) {
iSendTheCachePOSTRequest( restSessionContainer.getImportIDs().get(id));
}
@And("I load element \\{(\\d+)\\} from Info SessionContainer into currentRequest HEADER \\{(.*?)\\}$")
public void load_element_from_Info_SessionContainer_into_currentRequest_Header_(int id, String headerName) throws Throwable {
currentRequest.getHeaders().put(headerName, restSessionContainer.getImportIDs().get(id));
......
......@@ -28,8 +28,16 @@ Feature: API - TSA - Infohub - v1/export GET
Scenario: TSA - Export through Infohub - Positive
When I export the {testexport} via TSA Infohub API
Then the status code should be {200}
## If the result is not in the cache the first call returns the below result
## And the field {result} has the value {export request is accepted}
When I export the {testexport} via TSA Infohub API
Then the status code should be {200}
And the response is valid according to the {Infohub_Export_schema.json} REST schema
And the field {proof.verificationMethod} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1}
And the field {proof.type} has the value {JsonWebSignature2020}
Scenario: TSA - Export missing export through Infohub - Negative
When I export the {missing_export} via TSA Infohub API
Then the status code should be {404}
And the response is valid according to the {Policy_Evaluate_negative_schema.json} REST schema
And the field {message} has the value {export configuration not found}
......@@ -29,4 +29,11 @@ Feature: API - TSA - Infohub - v1/export POST
When I load the REST request {Infohub.json} with profile {successful_import}
And I import data via TSA Infohub API
Then the status code should be {200}
And the response is valid according to the {Infohub_Import_schema.json} REST schema
\ No newline at end of file
And the response is valid according to the {Infohub_Import_schema.json} REST schema
@wip @bug-signer-#13 @negative
Scenario: TSA - Import empty data to Infohub - Negative
When I set the following request body {{}}
And I import data via TSA Infohub API
And the status code should be {400}
And the field {message} has the value {missing required payload}
......@@ -32,7 +32,7 @@ Feature: API - TSA - Signer credential proof - v1/credential/proof POST
And the response is valid according to the {Signer_CredentialProof_schema.json} REST schema
And the field {proof.verificationMethod} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1}
@wip @bug-signer-#13
@wip @bug-signer-#13 @negative
Scenario: TSA - validate credential proof with empty body - Negative
When I set the following request body {{}}
When I create credential proof via TSA Signer API
......
......@@ -32,7 +32,7 @@ Feature: API - TSA - Signer presentation proof - v1/presentation/proof POST
And the response is valid according to the {Signer_PresentationProof_schema.json} REST schema
And the field {proof.verificationMethod} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1}
@wip @bug-signer-#13
@wip @bug-signer-#13 @negative
Scenario: TSA - validate presentation proof with empty body - Negative
When I set the following request body {{}}
When I create presentation proof via TSA Signer API
......
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