From 42679819f7c6f775b2f0e7990fd733bcf6e3f1be Mon Sep 17 00:00:00 2001 From: Jamo Luhrsen Date: Tue, 2 Feb 2016 11:32:07 -0800 Subject: [PATCH] refactoring Bug suite - 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 --- .../{Bug_4794.robot => Bug_Validation.robot} | 27 +++++++++++++------ csit/testplans/ovsdb-southbound.txt | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) rename csit/suites/ovsdb/Southbound_Domain/{Bug_4794.robot => Bug_Validation.robot} (74%) diff --git a/csit/suites/ovsdb/Southbound_Domain/Bug_4794.robot b/csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot similarity index 74% rename from csit/suites/ovsdb/Southbound_Domain/Bug_4794.robot rename to csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot index af2eaf5fdd..153706521e 100644 --- a/csit/suites/ovsdb/Southbound_Domain/Bug_4794.robot +++ b/csit/suites/ovsdb/Southbound_Domain/Bug_Validation.robot @@ -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 *** diff --git a/csit/testplans/ovsdb-southbound.txt b/csit/testplans/ovsdb-southbound.txt index fcce6221fe..778f728a49 100644 --- a/csit/testplans/ovsdb-southbound.txt +++ b/csit/testplans/ovsdb-southbound.txt @@ -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 -- 2.36.6