Expect RSP to be persisted from oxygen onward (II) 63/68763/3
authorJaime Caamaño Ruiz <jcaamano@suse.com>
Mon, 26 Feb 2018 11:47:02 +0000 (12:47 +0100)
committerJamo Luhrsen <jluhrsen@redhat.com>
Mon, 26 Feb 2018 18:59:46 +0000 (18:59 +0000)
Previous patch did not account for the fact that CSIT is non versioned
and that RSPs would not be persisted on nitrogen and before.

Change-Id: Id897262add499063e6231778e202f3985dd3eff6
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
csit/suites/sfc/SFC_Persistency/020__sfc_persistency.robot

index 8c8019e50486b30e59b49404fb55152348b16e52..31cb8d3bf05a18449fb86b345ed8630073be61c1 100644 (file)
@@ -10,6 +10,7 @@ Library           HttpLibrary.HTTP
 Library           ../../../libraries/SFC/SfcUtils.py
 Resource          ../../../libraries/SFC/SfcKeywords.robot
 Resource          ../../../libraries/ClusterOpenFlow.robot
+Resource          ../../../libraries/CompareStream.robot
 Resource          ../../../libraries/KarafKeywords.robot
 Resource          ../../../variables/sfc/Variables.robot
 Resource          ../../../libraries/Utils.robot
@@ -29,7 +30,7 @@ ${CREATE_RSP1_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","nam
 
 *** Test Cases ***
 Add SFC Elements and restart cluster
-    [Documentation]    Add SFC Elements and restart the cluster. Next, it is queried the RSP wich returns a 404 error code.
+    [Documentation]    Add SFC Elements, restart the cluster and check that persisted resources are present
     Add SFC Elements
     ${session} =    Resolve Http Session for Controller
     Kill_Members_From_List_Or_All
@@ -41,7 +42,10 @@ Add SFC Elements and restart cluster
     Wait until Keyword succeeds    2min    5 sec    Get Data From URI    session    ${SERVICE_CHAINS_URI}
     Wait until Keyword succeeds    2min    5 sec    Get Data From URI    session    ${SERVICE_FUNCTION_PATHS_URI}
     Wait until Keyword succeeds    2min    5 sec    TemplatedRequests.Get_As_Json_Templated    session=${session}    folder=${RESTCONF_MODULES_DIR}    verify=False
-    Wait until Keyword succeeds    2min    5 sec    Get Data From URI    session    ${OPERATIONAL_RSPS_URI}
+    # From oxygen, RSPs are persisted between reboots
+    Run_Keyword_If_At_Least_Else    oxygen    Wait until Keyword succeeds    2min    5 sec    Get Data From URI    session
+    ...    ${OPERATIONAL_RSPS_URI}
+    ...    ELSE    No Content From URI    session    ${OPERATIONAL_RSPS_URI}
     [Teardown]    Remove SFC Elements
 
 *** Keywords ***