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