69481d80caecb10f8e83e95959290b7a6af48d6c
[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 Library           ../../../libraries/Sxp.py
8 Resource          ../../../libraries/ClusterManagement.robot
9 Resource          ../../../libraries/SxpClusterLib.robot
10
11 *** Test Cases ***
12 Isolation of SXP service follower Test
13     [Documentation]    Test SXP connection switchover only if Controller with SCS is isolated
14     Check Shards Status
15     ${controller_index} =    Get Active Controller
16     Isolate SXP Controller    ${controller_index}
17
18 Isolation of SXP noservice follower Test
19     [Documentation]    Test SXP connection switchover only if Controller without SCS are isolated
20     Check Shards Status
21     ${controller_index} =    Get Inactive Controller
22     Isolate SXP Controller    ${controller_index}
23
24 *** Keywords ***
25 Isolate SXP Controller
26     [Arguments]    ${controller_index}
27     [Documentation]    Isolate one of cluster nodes and perform check that Device is still connected afterwards reverts isolation
28     Isolate_Member_From_List_Or_All    ${controller_index}
29     Wait Until Keyword Succeeds    240    1    Sync_Status_Should_Be_False    ${controller_index}
30     Wait Until Keyword Succeeds    60    1    Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}
31     Flush_Iptables_From_List_Or_All
32     Wait Until Keyword Succeeds    240    1    Sync_Status_Should_Be_True    ${controller_index}
33     Wait Until Keyword Succeeds    60    1    Check Device is Connected    ${DEVICE_NODE_ID}    session=${DEVICE_SESSION}