632255d5c792063f04c374152004d012c945b47a
[integration/test.git] / csit / suites / sxp / clustering / 010_Connection_switchover.robot
1 *** Settings ***
2 Documentation     Test suite to test cluster connection switchover
3 Suite Setup       Setup SXP Cluster Session
4 Suite Teardown    Clean SXP Cluster Session
5 Test Setup        Setup SXP Cluster
6 Test Teardown     Clean SXP Cluster
7 Resource          ../../../libraries/ClusterManagement.robot
8 Resource          ../../../libraries/SxpClusterLib.robot
9
10 *** Test Cases ***
11 Isolation of SXP service follower Test
12     [Documentation]    Test SXP connection switchover only if Controller with SCS is isolated
13     SxpClusterLib.Check Shards Status
14     ${controller_index} =    SxpClusterLib.Get Active Controller
15     Isolate SXP Controller    ${controller_index}
16
17 Isolation of SXP noservice follower Test
18     [Documentation]    Test SXP connection switchover only if Controller without SCS are isolated
19     SxpClusterLib.Check Shards Status
20     ${controller_index} =    SxpClusterLib.Get Inactive Controller
21     Isolate SXP Controller    ${controller_index}
22
23 *** Keywords ***
24 Isolate SXP Controller
25     [Arguments]    ${controller_index}
26     [Documentation]    Isolate one of cluster nodes and perform check that Device is still connected afterwards reverts isolation
27     ClusterManagement.Isolate_Member_From_List_Or_All    ${controller_index}
28     BuiltIn.Wait Until Keyword Succeeds    240    1    ClusterManagement.Sync_Status_Should_Be_False    ${controller_index}
29     BuiltIn.Wait Until Keyword Succeeds    60    1    SxpClusterLib.Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
30     ClusterManagement.Flush_Iptables_From_List_Or_All
31     BuiltIn.Wait Until Keyword Succeeds    240    1    ClusterManagement.Sync_Status_Should_Be_True    ${controller_index}
32     BuiltIn.Wait Until Keyword Succeeds    60    1    SxpClusterLib.Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}