diff --git a/src/main/resources/REST/json/Policy.json b/src/main/resources/REST/json/Policy.json index 9ecb0593386ec8ed0a00c21274a2182f5d2314f3..d7a8debb80dd680e0e10894c5eed8a2e8a5a058d 100644 --- a/src/main/resources/REST/json/Policy.json +++ b/src/main/resources/REST/json/Policy.json @@ -5,9 +5,12 @@ "unsuccessful_evaluate": { "message": "wrong value!" }, - "didResolve_evaluate": { + "didResolve_indy_evaluate": { "did":"did:indy:idunion:BDrEcHc8Tb4Lb2VyQZWEDE" }, + "didResolve_evaluate": { + "did":"did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6" + }, "didResolve_missing_method": { "did":"did:idunion:BDrEcHc8Tb4Lb2VyQZWEDE" } diff --git a/src/main/resources/REST/schemas/Policy_EvaluateDID_schema.json b/src/main/resources/REST/schemas/Policy_EvaluateDID_schema.json index 5366333a3446c34403ca7acc6f4c7545e518c2d3..5af228b1623a683b3dfeb0fff0afa3ec75d3c93e 100644 --- a/src/main/resources/REST/schemas/Policy_EvaluateDID_schema.json +++ b/src/main/resources/REST/schemas/Policy_EvaluateDID_schema.json @@ -40,9 +40,6 @@ "id": { "type": "string" }, - "publicKeyBase58": { - "type": "string" - }, "type": { "type": "string" } @@ -50,7 +47,6 @@ "required": [ "controller", "id", - "publicKeyBase58", "type" ] } diff --git a/src/test/resources/features/tsa/policy/policy/{group}/{name}/{version}/evaluation/POST.feature b/src/test/resources/features/tsa/policy/policy/{group}/{name}/{version}/evaluation/POST.feature index 6facb008ce5682e24f4eba45f15a650c68d6f9c3..5b6be0e99b9a141456fed7fb058c5bd8473906d6 100644 --- a/src/test/resources/features/tsa/policy/policy/{group}/{name}/{version}/evaluation/POST.feature +++ b/src/test/resources/features/tsa/policy/policy/{group}/{name}/{version}/evaluation/POST.feature @@ -37,13 +37,13 @@ Feature: API -TSA - Policy - :group/:name/:version/evaluation POST And the response is valid according to the {Policy_Evaluate_schema.json} REST schema And the field {result.allow} has the value {true} - @bug @issue-35 + @issue-35 Scenario: TSA - DID resolution - Positive Given I load the REST request {Policy.json} with profile {didResolve_evaluate} And I execute the policy {/policy/example/resolve/1.0/evaluation} Then the status code should be {200} And the response is valid according to the {Policy_EvaluateDID_schema.json} REST schema - And the field {result.data.didDocument.id} has the value {did:indy:idunion:BDrEcHc8Tb4Lb2VyQZWEDE} + And the field {result.data.didDocument.id} has the value {did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6} @negative Scenario: TSA - Evaluate policy with incorrect value - Negative @@ -68,7 +68,7 @@ Feature: API -TSA - Policy - :group/:name/:version/evaluation POST And the response is valid according to the {Policy_Evaluate_negative_schema.json} REST schema And the field {message} has the value {error evaluating policy} - @negative @bug @issue-35 + @negative @issue-35 Scenario: TSA - DID resolution with incorrect did - Negative Then I load the REST request {Policy.json} with profile {didResolve_missing_method} And I execute the policy {/policy/example/resolve/1.0/evaluation} diff --git a/src/test/resources/features/tsa/task/v1/task/{taskName}/GET.feature b/src/test/resources/features/tsa/task/v1/task/{taskName}/GET.feature index 446f7dcb925295d22d5810b124747b5bec333436..661769333b50faf8ae2e0c39372c7ef9692e1b2b 100644 --- a/src/test/resources/features/tsa/task/v1/task/{taskName}/GET.feature +++ b/src/test/resources/features/tsa/task/v1/task/{taskName}/GET.feature @@ -30,7 +30,7 @@ Feature: API -TSA - Task - v1/task GET Background: Given we are testing the TSA Task Api - @bug @issue-35 + @issue-35 Scenario: TSA - Executing Task with DID resolver and Evaluate the Cache - Positive Given I load the REST request {Policy.json} with profile {didResolve_evaluate} And I send the current request as POST to endpoint {/v1/task/didResolve} @@ -40,13 +40,13 @@ Feature: API -TSA - Task - v1/task GET Then I get the value of {taskID} from the last response and store it in the DataContainer with key {taskID} Then I clear the request body And I wait for {2000} mseconds - And I send the current request to endpoint {taskResult} with container value{taskID} + And I send the current request to endpoint {v1/taskResult} with container value{taskID} Then the status code should be {200} And the response is valid according to the {Task_ExecuteDID_schema.json} REST schema - And the field {result.data.didDocument.id} has the value {did:indy:idunion:BDrEcHc8Tb4Lb2VyQZWEDE} + And the field {result.data.didDocument.id} has the value {did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6} # Test the Cache Service Then I load object with key {taskID} from DataContainer into currentRequest HEADER {x-cache-key} - And I send the current request as GET to endpoint {http://localhost:8083/v1/cache} + And I send the current request as GET to endpoint {https://gaiax.vereign.com/tsa/cache/v1/cache} And the status code should be {200} And the response is valid according to the {Task_ExecuteDID_schema.json} REST schema - And the field {result.data.didDocument.id} has the value {did:indy:idunion:BDrEcHc8Tb4Lb2VyQZWEDE} \ No newline at end of file + And the field {result.data.didDocument.id} has the value {did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6} \ No newline at end of file diff --git a/src/test/resources/features/tsa/task/v1/task/{taskName}/POST.feature b/src/test/resources/features/tsa/task/v1/task/{taskName}/POST.feature index 2d135477d9a5a126845573e0cf2bc1ff952906ee..458018e7b8df243daf81311fa388bf121daa1f1c 100644 --- a/src/test/resources/features/tsa/task/v1/task/{taskName}/POST.feature +++ b/src/test/resources/features/tsa/task/v1/task/{taskName}/POST.feature @@ -30,7 +30,7 @@ Feature: API -TSA - Task - v1/task POST Background: Given we are testing the TSA Task Api - @bug @issue-35 + @issue-35 Scenario: TSA - Executing Task with DID resolver - Positive Then I load the REST request {Policy.json} with profile {didResolve_evaluate} And I send the current request as POST to endpoint {/v1/task/didResolve} @@ -39,10 +39,10 @@ Feature: API -TSA - Task - v1/task POST Then I get the value of {taskID} from the last response and store it in the DataContainer with key {taskID} Then I clear the request body And I wait for {2000} mseconds - And I send the current request to endpoint {taskResult} with container value{taskID} + And I send the current request to endpoint {v1/taskResult} with container value{taskID} Then the status code should be {200} And the response is valid according to the {Task_ExecuteDID_schema.json} REST schema - And the field {result.data.didDocument.id} has the value {did:indy:idunion:BDrEcHc8Tb4Lb2VyQZWEDE} + And the field {result.data.didDocument.id} has the value {did:key:z6Mkfriq1MqLBoPWecGoDLjguo1sB9brj6wT3qZ5BxkKpuP6} @negative Scenario: TSA - Executing Task with non existing task template - Negative