d673aefb59ca8e4af6b4b75269de9261286ac051
[integration/test.git] / test / csit / suites / controller / MD_SAL_Cluster_Datastore / 060_failover_read_from_new_leader.txt
1 *** Settings ***
2 Documentation     This test reads the data from the leader that was written to the follower by the previous test
3 Library           ../../../libraries/CrudLibrary.py
4 Library           ../../../libraries/ClusterStateLibrary.py
5
6 *** Variables ***
7 ${SHARD}    shard-car-config
8
9 *** Test Cases ***
10 Find Leader
11     [Documentation]    find new leader
12   ${NEW_LEADER}    GetLeader  ${SHARD}  ${3}  ${3}  ${2}  ${8181}  ${MEMBER1}  ${MEMBER2}  ${MEMBER3}
13   Log  ${NEW_LEADER}
14   Set Suite Variable    ${NEW_LEADER}
15
16 Get cars from new leader
17     [Documentation]    get 40 cars from new leader
18         ${resp}         Getcars ${NEW_LEADER}   ${PORT} ${0}
19         Should Be Equal As Strings    ${resp.status_code}    200
20         Should Contain     ${resp.content}   manufacturer1
21         Should Contain     ${resp.content}   manufacturer40
22         Should Not Contain     ${resp.content}   manufacturer50
23
24 Get people from new leader
25     [Documentation]    get 40 people from new leader
26         ${resp}         GetPersons      ${NEW_LEADER}   ${PORT} ${0}
27         Should Be Equal As Strings    ${resp.status_code}    200
28         Should Contain     ${resp.content}   user2
29         Should Contain     ${resp.content}   user40
30         Should Not Contain     ${resp.content}   user50
31
32 Get car-person mappings at new leader
33    [Documentation]      Get car-person mappings using last to see 40 entry
34         ${resp}         GetCarPersonMappings    ${NEW_LEADER}   ${PORT} ${0}
35         Should Be Equal As Strings    ${resp.status_code}    200
36         Should Contain     ${resp.content}   user5
37         Should Contain     ${resp.content}   user40