From fd2db28442ea862f7606abfa7e21db6ab07d8f5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jaime=20Caama=C3=B1o=20Ruiz?= Date: Tue, 30 Jan 2018 19:47:59 +0100 Subject: [PATCH] Check service function types are removed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Check service function types are removed at suite/test teardown before continuing with the nex test/suite. This prevents service funtion types being removed during the nex test/suite making it to fail. Change-Id: Ie6f2bc82b0933c70c99b8e83f44ffe36f48704d7 Signed-off-by: Jaime Caamaño Ruiz --- csit/libraries/SFC/SfcKeywords.robot | 7 ++++++- csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot | 3 ++- .../015__sfc_rendered_service_paths_logical.robot | 5 +++-- csit/suites/sfc/Full_Deploy/016__sfc_symmetric_RSP.robot | 3 ++- .../sfc/SFC_Basic/070__sfc_rendered_service_paths.robot | 3 ++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/csit/libraries/SFC/SfcKeywords.robot b/csit/libraries/SFC/SfcKeywords.robot index 639ec384b7..f6309b293b 100644 --- a/csit/libraries/SFC/SfcKeywords.robot +++ b/csit/libraries/SFC/SfcKeywords.robot @@ -20,11 +20,16 @@ Check Classifier Flows Should Contain Match ${flowList} *actions=pop_nsh* Should Contain Match ${flowList} *actions=push_nsh* -Check Service Function Types +Check Service Function Types Added [Arguments] ${elements} [Documentation] Check that the service function types are updated with the service function names Check For Elements At URI ${SERVICE_FUNCTION_TYPES_URI} ${elements} +Check Service Function Types Removed + [Arguments] ${elements} + [Documentation] Check that the service function names are removed from the service function types + Check For Elements Not At URI ${SERVICE_FUNCTION_TYPES_URI} ${elements} + Switch Ips In Json Files [Arguments] ${json_dir} ${container_names} ${normalized_dir}= OperatingSystem.Normalize Path ${json_dir}/*.json diff --git a/csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot b/csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot index 047b48c8a0..e9ef7790db 100644 --- a/csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot +++ b/csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot @@ -25,7 +25,7 @@ Basic Environment Setup Tests Add Elements To URI From File ${SERVICE_FORWARDERS_URI} ${SERVICE_FORWARDERS_FILE} Add Elements To URI From File ${SERVICE_NODES_URI} ${SERVICE_NODES_FILE} Add Elements To URI From File ${SERVICE_FUNCTIONS_URI} ${SERVICE_FUNCTIONS_FILE} - Wait Until Keyword Succeeds 60s 2s Check Service Function Types ${SF_NAMES} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Added ${SF_NAMES} Add Elements To URI From File ${SERVICE_CHAINS_URI} ${SERVICE_CHAINS_FILE} Add Elements To URI From File ${SERVICE_METADATA_URI} ${SERVICE_METADATA_FILE} Add Elements To URI From File ${SERVICE_FUNCTION_PATHS_URI} ${SERVICE_FUNCTION_PATHS_FILE} @@ -86,6 +86,7 @@ Cleanup Suite Remove All Elements At URI ${SERVICE_CLASSIFIERS_URI} Remove All Elements At URI ${SERVICE_FUNCTION_ACLS_URI} Remove All Elements At URI ${SERVICE_FUNCTIONS_URI} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Removed ${SF_NAMES} Remove All Elements At URI ${SERVICE_FORWARDERS_URI} Remove All Elements At URI ${SERVICE_NODES_URI} Remove All Elements At URI ${SERVICE_CHAINS_URI} diff --git a/csit/suites/sfc/Full_Deploy/015__sfc_rendered_service_paths_logical.robot b/csit/suites/sfc/Full_Deploy/015__sfc_rendered_service_paths_logical.robot index 927517fd16..40575e957c 100644 --- a/csit/suites/sfc/Full_Deploy/015__sfc_rendered_service_paths_logical.robot +++ b/csit/suites/sfc/Full_Deploy/015__sfc_rendered_service_paths_logical.robot @@ -33,7 +33,7 @@ Basic Environment Setup Tests [Documentation] Prepare Basic Test Environment. Logical SFF Add Elements To URI From File ${SERVICE_FORWARDERS_URI} ${SERVICE_FORWARDERS_FILE} Add Elements To URI From File ${SERVICE_FUNCTIONS_URI} ${SERVICE_FUNCTIONS_FILE} - Wait Until Keyword Succeeds 60s 2s Check Service Function Types ${SF_NAMES} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Added ${SF_NAMES} Add Elements To URI From File ${SERVICE_CHAINS_URI} ${SERVICE_CHAINS_FILE} Add Elements To URI From File ${SERVICE_FUNCTION_PATHS_URI} ${SERVICE_FUNCTION_PATHS_FILE} @@ -125,11 +125,12 @@ Delete All Elements Remove All Elements If Exist ${SERVICE_CHAINS_URI} Remove All Elements If Exist ${SERVICE_FORWARDERS_URI} Remove All Elements If Exist ${SERVICE_FUNCTIONS_URI} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Removed ${SF_NAMES} Create All Elements [Documentation] Delete all provisioned elements Add Elements To URI From File ${SERVICE_FUNCTIONS_URI} ${SERVICE_FUNCTIONS_FILE} - Wait Until Keyword Succeeds 60s 2s Check Service Function Types ${SF_NAMES} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Added ${SF_NAMES} Add Elements To URI From File ${SERVICE_FORWARDERS_URI} ${SERVICE_FORWARDERS_FILE} Add Elements To URI From File ${SERVICE_CHAINS_URI} ${SERVICE_CHAINS_FILE} Add Elements To URI From File ${SERVICE_FUNCTION_PATHS_URI} ${SERVICE_FUNCTION_PATHS_FILE} diff --git a/csit/suites/sfc/Full_Deploy/016__sfc_symmetric_RSP.robot b/csit/suites/sfc/Full_Deploy/016__sfc_symmetric_RSP.robot index 2a74d35df2..99a1809ee7 100644 --- a/csit/suites/sfc/Full_Deploy/016__sfc_symmetric_RSP.robot +++ b/csit/suites/sfc/Full_Deploy/016__sfc_symmetric_RSP.robot @@ -72,7 +72,7 @@ Basic Environment Setup Add Elements To URI From File ${SERVICE_NODES_URI} ${SERVICE_NODES_FILE} Add Elements To URI From File ${SERVICE_FUNCTION_TYPES_URI} ${SERVICE_FUNCTION_TYPES_FILE} Add Elements To URI From File ${SERVICE_FUNCTIONS_URI} ${SERVICE_FUNCTIONS_FILE} - Wait Until Keyword Succeeds 60s 2s Check Service Function Types ${SF_NAMES} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Added ${SF_NAMES} Add Elements To URI From File ${SERVICE_CHAINS_URI} ${SERVICE_CHAINS_FILE} Add Elements To URI From File ${SERVICE_FUNCTION_PATHS_URI} ${SERVICE_FUNCTION_PATHS_FILE} @@ -83,6 +83,7 @@ End Suite Clean Datastore [Documentation] Remove All Elements Remove All Elements If Exist ${SERVICE_FUNCTIONS_URI} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Removed ${SF_NAMES} Remove All Elements If Exist ${SERVICE_FORWARDERS_URI} Remove All Elements If Exist ${SERVICE_NODES_URI} Remove All Elements If Exist ${SERVICE_CHAINS_URI} diff --git a/csit/suites/sfc/SFC_Basic/070__sfc_rendered_service_paths.robot b/csit/suites/sfc/SFC_Basic/070__sfc_rendered_service_paths.robot index 9fffc91bea..3a07579ae7 100644 --- a/csit/suites/sfc/SFC_Basic/070__sfc_rendered_service_paths.robot +++ b/csit/suites/sfc/SFC_Basic/070__sfc_rendered_service_paths.robot @@ -18,7 +18,7 @@ Basic Environment Setup Tests Add Elements To URI From File ${SERVICE_FORWARDERS_URI} ${SERVICE_FORWARDERS_FILE} Add Elements To URI From File ${SERVICE_NODES_URI} ${SERVICE_NODES_FILE} Add Elements To URI From File ${SERVICE_FUNCTIONS_URI} ${SERVICE_FUNCTIONS_FILE} - Wait Until Keyword Succeeds 60s 2s Check Service Function Types ${SERVICE_FUNCTION_NAMES} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Added ${SERVICE_FUNCTION_NAMES} Add Elements To URI From File ${SERVICE_CHAINS_URI} ${SERVICE_CHAINS_FILE} Add Elements To URI From File ${SERVICE_FUNCTION_PATHS_URI} ${SERVICE_FUNCTION_PATHS_FILE} @@ -208,6 +208,7 @@ Generate RSPs with Shortest Path Schedule Algorithm type Clean Datastore After Tests [Documentation] Clean All Items In Datastore After Tests Remove All Elements At URI ${SERVICE_FUNCTIONS_URI} + Wait Until Keyword Succeeds 60s 2s Check Service Function Types Removed ${SERVICE_FUNCTION_NAMES} Remove All Elements At URI ${SERVICE_FORWARDERS_URI} Remove All Elements At URI ${SERVICE_NODES_URI} Remove All Elements At URI ${SERVICE_CHAINS_URI} -- 2.36.6