2 Documentation Test suite for testing Distributed Datastore main operations performed from follower2
5 Library ../../../../libraries/RequestsLibrary.py
6 Library ../../../../libraries/Common.py
7 Library ../../../../libraries/CrudLibrary.py
8 Library ../../../../libraries/SettingsLibrary.py
9 Library ../../../../libraries/UtilLibrary.py
10 Library ../../../../libraries/ClusterStateLibrary.py
11 Variables ../../../../variables/Variables.py
14 ${REST_CONTEXT} /restconf/config/
15 ${SHARD_CAR_NAME} shard-car-config
16 ${SHARD_PEOPLE_NAME} shard-people-config
17 ${SHARD_CAR_PERSON_NAME} shard-car-people-config
21 Add cars and get cars from Follower2
22 [Documentation] Add 100 cars and get added cars from Follower2
23 ${FOLLOWERS} GetFollowers ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2}
25 SET SUITE VARIABLE ${FOLLOWERS}
27 ${resp} AddCar ${FOLLOWERS[1]} ${PORT} ${100}
29 ${resp} Getcars ${FOLLOWERS[1]} ${PORT} ${0}
30 Should Be Equal As Strings ${resp.status_code} 200
31 Should Contain ${resp.content} manufacturer1
33 Add persons and get persons from Follower2
34 [Documentation] Add 100 persons and get persons from Follower2
35 [Documentation] Note: There should be one person added first to enable rpc
36 ${resp} AddPerson ${FOLLOWERS[1]} ${PORT} ${0}
37 ${resp} AddPerson ${FOLLOWERS[1]} ${PORT} ${100}
39 ${resp} GetPersons ${FOLLOWERS[1]} ${PORT} ${0}
40 Should Be Equal As Strings ${resp.status_code} 200
41 Should Contain ${resp.content} user5
43 Add car-person mapping and get car-person mapping from Follower2
44 [Documentation] Add car-person and get car-person from Follower2
45 [Documentation] Note: This is done to enable working of rpc
47 ${resp} AddCarPerson ${FOLLOWERS[1]} ${PORT} ${0}
48 ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0}
49 Should Be Equal As Strings ${resp.status_code} 200
50 Should Contain ${resp.content} user0
52 Purchase 100 cars using Follower1
53 [Documentation] Purchase 100 cars using Follower2
55 ${resp} BuyCar ${FOLLOWERS[1]} ${PORT} ${100}
57 ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0}
58 Should Be Equal As Strings ${resp.status_code} 200
60 Get car-person mappings using Follower2
61 [Documentation] Get car-person mappings using follower2 to see 100 entry
62 ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0}
63 Should Be Equal As Strings ${resp.status_code} 200
64 Should Contain ${resp.content} user100
65 Should Contain ${resp.content} user5
67 Get car-person mappings using Leader
68 [Documentation] Get car-person mappings using Leader to see 100 entry
69 ${CURRENT_CAR_LEADER} GetLeader ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2}
70 Log ${CURRENT_CAR_LEADER}
72 ${resp} GetCarPersonMappings ${CURRENT_CAR_LEADER} ${PORT} ${0}
73 Should Be Equal As Strings ${resp.status_code} 200
74 Should Contain ${resp.content} user100
76 Get car-person mappings using Follower1
77 [Documentation] Get car-person mappings using Follower1 to see 100 entry
78 ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0}
79 Should Be Equal As Strings ${resp.status_code} 200
80 Should Contain ${resp.content} user0
81 Should Contain ${resp.content} user100