*** Settings *** Documentation This test executes CRUD operations on any one follower after the old leader has been brought down Library ../../../libraries/CrudLibrary.py Library ../../../libraries/ClusterStateLibrary.py *** Variables *** ${SHARD} shard-car-config *** Test Cases *** Find follower [Documentation] find follower ${FOLLOWERS} GetFollowers ${SHARD} ${3} ${3} ${2} ${8181} ${MEMBER1} ${MEMBER2} ${MEMBER3} Log ${FOLLOWERS} ${LAST_FOLLOWER} Set Variable ${FOLLOWERS[0]} Set Suite Variable ${LAST_FOLLOWER} Delete cars at last follower [Documentation] delete cars DeleteAllCars ${LAST_FOLLOWER} ${PORT} ${0} ${resp} Getcars ${LAST_FOLLOWER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 404 Delete people at last follower [Documentation] delete people DeleteAllPersons ${LAST_FOLLOWER} ${PORT} ${0} ${resp} GetPersons ${LAST_FOLLOWER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 404 Add cars and get cars from last follower [Documentation] Add 40 cars and get added cars from last follower ${resp} AddCar ${LAST_FOLLOWER} ${PORT} ${40} Sleep 8 ${resp} Getcars ${LAST_FOLLOWER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} manufacturer1 Should Contain ${resp.content} manufacturer40 Should Not Contain ${resp.content} manufacturer50 Add people and get people from last follower [Documentation] Add 40 persons and get people [Documentation] Note: There should be one person added first to enable rpc ${resp} AddPerson ${LAST_FOLLOWER} ${PORT} ${0} ${resp} AddPerson ${LAST_FOLLOWER} ${PORT} ${40} Sleep 8 ${resp} GetPersons ${LAST_FOLLOWER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} user2 Should Contain ${resp.content} user40 Should Not Contain ${resp.content} user50 Purchase 40 cars at last follower [Documentation] Add car-person and get car-person from last follower [Documentation] Note: This is done to enable working of rpc [Documentation] Purchase 40 cars using Leader ${resp} AddCarPerson ${LAST_FOLLOWER} ${PORT} ${0} ${resp} GetCarPersonMappings ${LAST_FOLLOWER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} user0 ${resp} BuyCar ${LAST_FOLLOWER} ${PORT} ${40} Sleep 8 Get car-person mappings at last follower [Documentation] Get car-person mappings using last follower to see 40 entry ${resp} GetCarPersonMappings ${LAST_FOLLOWER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} user5 Should Contain ${resp.content} user40