Include needed Assure_* keywords in BGP tests
[integration/test.git] / csit / suites / bgpcep / bgpingest / manypeers_changecount.robot
index 711b0b1d6ddcd783e4cc3cd7554d4a61a877c998..afed3ad3a614568962c0296f0256f27bde941c5c 100644 (file)
@@ -44,7 +44,7 @@ Documentation     BGP performance of ingesting from many iBGP peers, data change
 Suite Setup       Setup_Everything
 Suite Teardown    Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
-Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
+Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
 Library           DateTime
 Library           RequestsLibrary
 Library           SSHLibrary    timeout=10s
@@ -127,6 +127,7 @@ Wait_For_Stable_Talking_Ipv4_Topology
 Check_Talking_Ipv4_Topology_Count
     [Documentation]    Count the routes in example-ipv4-topology and fail if the count is not correct.
     [Tags]    critical
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     PrefixCounting.Check_Ipv4_Topology_Count    ${COUNT_CHANGE_COUNT_MANY}
 
 Kill_Talking_BGP_Speakers
@@ -136,7 +137,7 @@ Kill_Talking_BGP_Speakers
     BGPSpeaker.Kill_BGP_Speaker
     FailFast.Do_Not_Fail_Fast_From_Now_On
     # NOTE: It is still possible to remain failing fast, if both previous and this test have failed.
-    [Teardown]    FailFast.Do_Not_Start_Failing_If_This_Failed
+    [Teardown]    SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
 
 Wait_For_Stable_Ipv4_Topology_After_Talking
     [Documentation]    Wait until example-ipv4-topology becomes stable again.
@@ -146,6 +147,7 @@ Wait_For_Stable_Ipv4_Topology_After_Talking
 Check_For_Empty_Ipv4_Topology_After_Talking
     [Documentation]    Example-ipv4-topology should be empty now.
     [Tags]    critical
+    [Setup]    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
     PrefixCounting.Check_Ipv4_Topology_Is_Empty
 
 Restore_Karaf_Logging_Levels
@@ -174,17 +176,16 @@ Setup_Everything
     ChangeCounter.CC_Setup
     PrefixCounting.PC_Setup
     KarafKeywords.Open Controller Karaf Console On Background
-    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
-    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
-    Utils.Flexible_Controller_Login
     RequestsLibrary.Create_Session    operational    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API}    auth=${AUTH}
     # TODO: Do not include slash in ${OPERATIONAL_TOPO_API}, having it typed here is more readable.
     # TODO: Alternatively, create variable in Variables which starts with http.
     # Both TODOs would probably need to update every suite relying on current Variables.
+    SSHLibrary.Set_Default_Configuration    prompt=${ODL_SYSTEM_PROMPT}
+    SSHLibrary.Open_Connection    ${ODL_SYSTEM_IP}
+    Utils.Flexible_Controller_Login
     SSHKeywords.Require_Python
-    SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
-    SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/manage_play.py
     SSHKeywords.Assure_Library_Ipaddr    target_dir=.
+    SSHLibrary.Put_File    ${CURDIR}/../../../../tools/fastbgp/play.py
     # Calculate the timeout value based on how many routes are going to be pushed
     ${period} =    DateTime.Convert_Time    ${CHECK_PERIOD_CHANGE_COUNT_MANY}    result_format=number
     ${timeout} =    BuiltIn.Evaluate    ${TEST_DURATION_MULTIPLIER_CHANGE_COUNT_MANY} * (${COUNT_CHANGE_COUNT_MANY} * 3.0 / 10000 + ${period} * (${REPETITIONS_CHANGE_COUNT_MANY} + 1))