Check service function types are removed 32/67732/3
authorJaime Caamaño Ruiz <jcaamano@suse.com>
Tue, 30 Jan 2018 18:47:59 +0000 (19:47 +0100)
committerJamo Luhrsen <jluhrsen@redhat.com>
Wed, 31 Jan 2018 17:41:02 +0000 (17:41 +0000)
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 <jcaamano@suse.com>
csit/libraries/SFC/SfcKeywords.robot
csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot
csit/suites/sfc/Full_Deploy/015__sfc_rendered_service_paths_logical.robot
csit/suites/sfc/Full_Deploy/016__sfc_symmetric_RSP.robot
csit/suites/sfc/SFC_Basic/070__sfc_rendered_service_paths.robot

index 639ec384b758c0965e2570375efb5a5f65125b53..f6309b293b2af9b1742b18c683a25c0c255db7be 100644 (file)
@@ -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
index 047b48c8a0a7044f2ed77f832c38dedec00913e3..e9ef7790dbee253b142cade2bade5f52eb62b773 100644 (file)
@@ -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}
index 927517fd16c8a6020959d9d18fa7ac4e7930e1a1..40575e957c3458bcdae7867a114b733fc36b1c5a 100644 (file)
@@ -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}
index 2a74d35df2d82b8e30a6270f6861ea99288921de..99a1809ee780a8f9c87d24a3c26d77459ca395c1 100644 (file)
@@ -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}
index 9fffc91bea375c1815144340c2c4084782e55b1a..3a07579ae7a9d5b420927ca02a5456b71c30f0e7 100644 (file)
@@ -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}