From 876ba07c41fb51aadb2b36c3fd86d836334ed455 Mon Sep 17 00:00:00 2001 From: Georgi Michev <georgi.michev@vereign.com> Date: Mon, 19 Feb 2024 12:33:02 +0200 Subject: [PATCH] Update policy import scenarios Signed-off-by: Georgi Michev <georgi.michev@vereign.com> --- .../tsa/policy/policy/import/POST.feature | 23 +++++++++++++++---- .../{name}/{version}/export/GET.feature | 2 +- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/test/resources/features/tsa/policy/policy/import/POST.feature b/src/test/resources/features/tsa/policy/policy/import/POST.feature index 269f1095..b8fa0052 100644 --- a/src/test/resources/features/tsa/policy/policy/import/POST.feature +++ b/src/test/resources/features/tsa/policy/policy/import/POST.feature @@ -1,9 +1,11 @@ #Copyright (c) 2023 Vereign AG [https://www.vereign.com] -@rest @all @tsa @policy @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 -Feature: API - TSA - policy - /export GET +@rest @all @tsa @policy @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @IDM.TSA.E1.00056 + +Feature: API - TSA - policy - /import GET As user - I want to be able to import policy + I want to be able to export signed policy + then I want to be able to check the signature and if the policy is not modified to import it So I can use it Background: @@ -11,13 +13,26 @@ Feature: API - TSA - policy - /export GET @wip Scenario: TSA - Import specific policy - Positive + When I Export Policy group {example} name {examplePolicy} version {1.4} When I Import {policies_example_examplePolicy_1.4.zip} in to Policy Then the status code should be {200} And I execute the Policy group {example} name {examplePolicy} version {1.4} via TSA Policy API Then the status code should be {200} @negative @wip - Scenario: TSA - Import modified policy - Negative + Scenario Outline: TSA - Import modified policy with modified file <modifiedFile> - Negative + When I Export Policy group {example} name {examplePolicy} version {1.4} + Then I extract the content + And modify file <modifiedFile> + And I archive back all files from the bundle When I Import {policies_example_modifiedPolicy_1.4.zip} in to Policy Then the status code should be {403} And the field {message} contains the value {failed to verify bundle} + + Examples: + | modifiedFile | + | data-config.json | + | data.json | + | export-config.json | + | export-config.json | + | export-config.json | diff --git a/src/test/resources/features/tsa/policy/policy/{respository}/{group}/{name}/{version}/export/GET.feature b/src/test/resources/features/tsa/policy/policy/{respository}/{group}/{name}/{version}/export/GET.feature index 3f169829..0953b05f 100644 --- a/src/test/resources/features/tsa/policy/policy/{respository}/{group}/{name}/{version}/export/GET.feature +++ b/src/test/resources/features/tsa/policy/policy/{respository}/{group}/{name}/{version}/export/GET.feature @@ -1,6 +1,6 @@ #Copyright (c) 2023 Vereign AG [https://www.vereign.com] -@rest @all @tsa @policy @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @IDM.TSA.E1.00011 +@rest @all @tsa @policy @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @IDM.TSA.E1.00011 @IDM.TSA.E1.00056 Feature: API - TSA - policy - {repository}/{group}/{name}/{version}/export GET As user I want to be able to export policy -- GitLab