refactoring Bug suite 22/33922/2
authorJamo Luhrsen <jluhrsen@redhat.com>
Tue, 2 Feb 2016 19:32:07 +0000 (11:32 -0800)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 3 Feb 2016 10:50:08 +0000 (10:50 +0000)
-  renamed to indicate that more than one bug is validated
-  separated checks in to two test cases which cover one
   bug each

Change-Id: I86634f2a72fca5b0cd4e01196ee0ed9460a717d8
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot [moved from csit/suites/ovsdb/Southbound_Domain/Bug_4794.robot with 74% similarity]
csit/testplans/ovsdb-southbound.txt

similarity index 74%
rename from csit/suites/ovsdb/Southbound_Domain/Bug_4794.robot
rename to csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot
index af2eaf5fdd4b5062ae11a0df0ab5a1d7a85dbda7..153706521e0604163e6d36f44053c2fd34bdd046 100644 (file)
@@ -1,5 +1,7 @@
 *** Settings ***
-Documentation     Suite to test bug 4794 https://bugs.opendaylight.org/show_bug.cgi?id=4794
+Documentation     Collection of test cases to validate OVSDB projects bugs.
+...               -  https://bugs.opendaylight.org/show_bug.cgi?id=4794
+...               -  https://bugs.opendaylight.org/show_bug.cgi?id=5177
 Suite Setup       OVSDB Connection Manager Suite Setup
 Suite Teardown    OVSDB Connection Manager Suite Teardown
 Test Setup        Log Testcase Start To Controller Karaf
@@ -9,22 +11,22 @@ Library           String
 Library           RequestsLibrary
 Variables         ../../../variables/Variables.py
 Resource          ../../../libraries/Utils.robot
+Resource          ../../../libraries/WaitForFailure.robot
 Resource          ../../../libraries/OVSDB.robot
 
 *** Variables ***
 ${OVSDB_PORT}     6634
-${BRIDGE}         ovsdb-csit-test-4794
+${BRIDGE}         ovsdb-csit-test-5177
 ${SOUTHBOUND_CONFIG_API}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
 ${OVSDB_CONFIG_DIR}    ${CURDIR}/../../../variables/ovsdb
 
 *** Test Cases ***
-Bug 4794
+Bug 5177
     [Documentation]    This test case will recreate the bug using the same basic steps as
     ...    provided in the bug, and noted here:
-    ...    1) create bridge in config
+    ...    1) create bridge in config using the UUID determined in Suite Setup
     ...    2) connect ovs (vsctl set-manager)
-    ...    3) delete bridge in config
-    ...    4) disconnect ovs (vsctl del-manager)
+    ...    3) Fail if node is not discovered in Operational Store
     Create Bridge
     ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_TOPO_API}
     Log    ${resp.content}
@@ -32,11 +34,20 @@ Bug 4794
     Should Contain    ${resp.content}    ovsdb://uuid/${ovsdb_uuid}/bridge/${BRIDGE}
     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
     @{list}    Create List    ${BRIDGE}
-    Run Keyword And Continue On Failure    Wait Until Keyword Succeeds    8s    2s    Check For Elements At URI    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1    ${list}
+    Wait Until Keyword Succeeds    8s    2s    Check For Elements At URI    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1    ${list}
+    [Teardown]    Report_Failure_Due_To_Bug    5177
+
+Bug 4794
+    [Documentation]    This test is dependent on the work done in the Bug 5177 test case so should
+    ...    always be executed immediately after.
+    ...    1) delete bridge in config
+    ...    2) Poll and Fail if exception is seen in karaf.log
     ${resp}    RequestsLibrary.Delete Request    session    ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
     Should Be Equal As Strings    ${resp.status_code}    200    Response    status code error
     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-manager
-    Check Karaf Log File Does Not Have Messages    ${ODL_SYSTEM_IP}    Shard.*shard-topology-operational An exception occurred while preCommitting transaction
+    # If the exception is seen in karaf.log within 10s, the following line will FAIL, which is the point.
+    Verify_Keyword_Does_Not_Fail_Within_Timeout    10s    1s
+    ...    Check Karaf Log File Does Not Have Messages    ${ODL_SYSTEM_IP}    Shard.*shard-topology-operational An exception occurred while preCommitting transaction
     [Teardown]    Report_Failure_Due_To_Bug    4794
 
 *** Keywords ***
index fcce6221feb787f49ce70691664bd93f4948e419..778f728a491fa8d5316dc4a1237120055e57cc45 100644 (file)
@@ -5,4 +5,4 @@ integration/test/csit/suites/ovsdb/Southbound_Domain/040__Vxlan_Extension_Test.r
 # moving 010 to the end because bug 4756 will put plugin in a bad state and cause failures in 030
 integration/test/csit/suites/ovsdb/Southbound_Domain/010__configure_1_ovsdb_node.robot
 integration/test/csit/suites/ovsdb/Southbound_Domain/030__configure_exit_ovsdb_node.robot
-integration/test/csit/suites/ovsdb/Southbound_Domain/Bug_4794.robot
\ No newline at end of file
+integration/test/csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot