From 10b781a8c395ab6dc6544496d64275d42c4149f9 Mon Sep 17 00:00:00 2001 From: Basheeruddin Ahmed Date: Thu, 11 Sep 2014 00:21:01 -0700 Subject: [PATCH] renamed the test cases file name to contain proper sequence number updated test cases to utilize getLeader api Change-Id: I34ba798382587290d83cb71160b1ed0725d406e4 Signed-off-by: Basheeruddin Ahmed --- test/csit/libraries/ClusterStateLibrary.py | 6 +- test/csit/libraries/CrudLibrary.py | 12 ++- ...onf_rpc_crud_test_01_execute_on_leader.txt | 67 +++++++++------ ..._rpc_crud_test_02_execute_on_follower1.txt | 67 --------------- ..._rpc_crud_test_03_execute_on_follower2.txt | 67 --------------- ..._rpc_crud_test_02_execute_on_follower1.txt | 81 +++++++++++++++++++ ..._rpc_crud_test_03_execute_on_follower2.txt | 81 +++++++++++++++++++ 7 files changed, 218 insertions(+), 163 deletions(-) delete mode 100644 test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_02_execute_on_follower1.txt delete mode 100644 test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_03_execute_on_follower2.txt create mode 100644 test/csit/suites/clustering/datastore/basic/020_restconf_rpc_crud_test_02_execute_on_follower1.txt create mode 100644 test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt diff --git a/test/csit/libraries/ClusterStateLibrary.py b/test/csit/libraries/ClusterStateLibrary.py index fa0b9cdc6f..185bce874a 100644 --- a/test/csit/libraries/ClusterStateLibrary.py +++ b/test/csit/libraries/ClusterStateLibrary.py @@ -13,7 +13,7 @@ import sys # Given a shardname (e.g. shard-inventory-config), number of shards and bunch of ips # determines what role each ip has in an Akka (Raft based) cluster # result would look like -# {'Leader':10.194.126.118', 'Follower':10.194.126.118':, '10.194.126.117': None} +# {'10.194.126.118':'Leader', '10.194.126.118':'Follower', '10.194.126.117': None} # def getClusterRoles(shardName,numOfShards=3,numOfTries=3,sleepBetweenRetriesInSecs=1,port=8181,*ips): @@ -123,7 +123,7 @@ def testGetClusterRoles(): print (ip + " seems to have value "+ str(dict[ip])) def testGetLeader (): - leader = getLeader("shard-inventory-config",3,1,1,8181,"10.194.126.116","10.194.126.117","10.194.126.118") + leader = getLeader("shard-car-config",3,1,1,8181,"10.194.126.116","10.194.126.117","10.194.126.118") print leader return leader @@ -133,7 +133,7 @@ def testGetFollowers(): return followers #testGetClusterRoles() -#testGetLeader() +testGetLeader() #testGetFollowers() diff --git a/test/csit/libraries/CrudLibrary.py b/test/csit/libraries/CrudLibrary.py index 44cb149763..bc603521e3 100644 --- a/test/csit/libraries/CrudLibrary.py +++ b/test/csit/libraries/CrudLibrary.py @@ -175,7 +175,7 @@ def getCarPersonMappings(hostname,port,ignore): resp = UtilLibrary.get(SettingsLibrary.getCarPersonUrl(hostname,port),"admin","admin") resp.encoding = 'utf-8' print (resp) - + return resp # @@ -196,6 +196,16 @@ def deleteAllPersons(hostname,port,ignore): resp = getPersons(hostname,port,ignore) print("Persons in store after deletion:"+ str(resp)) + +# +#delete all car -poeple s in the store using RESTCONF +# +# +def deleteAllCarsPersons(hostname,port,ignore): + UtilLibrary.delete(SettingsLibrary.getCarPersonsUrl(hostname,port),"admin","admin") + resp = getPersons(hostname,port,ignore) + print("Persons in store after deletion:"+ str(resp)) + # # Usage message shown to user # diff --git a/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_01_execute_on_leader.txt b/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_01_execute_on_leader.txt index 8a37f89550..3bf86cba99 100644 --- a/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_01_execute_on_leader.txt +++ b/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_01_execute_on_leader.txt @@ -1,59 +1,76 @@ *** Settings *** -Documentation Test suite for RESTCONF RPC CAR PERSON +Documentation Test suite for testing Distributed Datastore main operations performed from leader + Library Collections Library ../../../../libraries/RequestsLibrary.py Library ../../../../libraries/Common.py Library ../../../../libraries/CrudLibrary.py Library ../../../../libraries/SettingsLibrary.py Library ../../../../libraries/UtilLibrary.py +Library ../../../../libraries/ClusterStateLibrary.py Variables ../../../../variables/Variables.py + *** Variables *** ${REST_CONTEXT} /restconf/config/ +${SHARD_CAR_NAME} shard-car-config +${SHARD_PEOPLE_NAME} shard-people-config +${SHARD_CAR_PERSON_NAME} shard-car-people-config -*** Test Cases *** -Add cars and get cars from Leader +*** Test Cases *** +Add cars and get cars from Leader [Documentation] Add 100 cars and get added cars from Leader - ${resp} AddCar ${LEADER} ${PORT} ${100} - ${resp} Getcars ${LEADER} ${PORT} ${0} + ${CURRENT_CAR_LEADER} GetLeader ${SHARD_CAR_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Log CURRENT_CAR_SHARD_LEADER ${CURRENT_CAR_LEADER} + Set Suite Variable ${CURRENT_CAR_LEADER} + ${resp} AddCar ${CURRENT_CAR_LEADER} ${PORT} ${100} + ${resp} Getcars ${CURRENT_CAR_LEADER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} manufacturer1 - -Add persons and get persons from Leader + Should Contain ${resp.content} manufacturer1 + +Add persons and get persons from Leader [Documentation] Add 100 persons and get persons [Documentation] Note: There should be one person added first to enable rpc - ${resp} AddPerson ${LEADER} ${PORT} ${0} - ${resp} AddPerson ${LEADER} ${PORT} ${100} - ${resp} GetPersons ${LEADER} ${PORT} ${0} + ${CURRENT_PEOPLE_LEADER} GetLeader ${SHARD_PEOPLE_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Set Suite Variable ${CURRENT_PEOPLE_LEADER} + ${resp} AddPerson ${CURRENT_PEOPLE_LEADER} ${PORT} ${0} + ${resp} AddPerson ${CURRENT_PEOPLE_LEADER} ${PORT} ${100} + ${resp} GetPersons ${CURRENT_PEOPLE_LEADER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user5 - -Add car-person mapping and get car-person mapping from Leader - [Documentation] Add car-person and get car-person from Leader - [Documentation] Note: This is done to enable working of rpc + Should Contain ${resp.content} user5 - ${resp} AddCarPerson ${LEADER} ${PORT} ${0} - ${resp} GetCarPersonMappings ${LEADER} ${PORT} ${0} +Add car-person mapping and get car-person mapping from Leader + [Documentation] Add car-person and get car-person from Leader + [Documentation] Note: This is done to enable working of rpc + ${CURRENT_CAR_PERSON_LEADER} GetLeader ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Set Suite Variable ${CURRENT_CAR_PERSON_LEADER} + ${resp} AddCarPerson ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0} + Sleep 2 + ${resp} GetCarPersonMappings ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} user0 - -Purchase 100 cars using Leader + +Purchase 100 cars using Leader [Documentation] Purchase 100 cars using Leader - ${resp} BuyCar ${LEADER} ${PORT} ${100} - ${resp} GetCarPersonMappings ${LEADER} ${PORT} ${0} + ${resp} BuyCar ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${100} + Sleep 2 + ${resp} GetCarPersonMappings ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Get car-person mappings using Leader [Documentation] Get car-person mappings using Leader to see 100 entry - ${resp} GetCarPersonMappings ${LEADER} ${PORT} ${0} + ${resp} GetCarPersonMappings ${CURRENT_CAR_PERSON_LEADER} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} user100 Get car-person mappings using Follower1 [Documentation] Get car-person mappings using Follower1 to see 100 entry - ${resp} GetCarPersonMappings ${FOLLOWER1} ${PORT} ${0} + ${FOLLOWERS} GetFollowers ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Log ${FOLLOWERS} + SET SUITE VARIABLE ${FOLLOWERS} + ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} user100 Should Contain ${resp.content} user5 @@ -61,7 +78,7 @@ Get car-person mappings using Follower1 Get car-person mappings using Follower2 [Documentation] Get car-person mappings using Follower2 to see 100 entry - ${resp} GetCarPersonMappings ${FOLLOWER2} ${PORT} ${0} + ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0} Should Be Equal As Strings ${resp.status_code} 200 Should Contain ${resp.content} user0 Should Contain ${resp.content} user100 diff --git a/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_02_execute_on_follower1.txt b/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_02_execute_on_follower1.txt deleted file mode 100644 index ebd3d8707a..0000000000 --- a/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_02_execute_on_follower1.txt +++ /dev/null @@ -1,67 +0,0 @@ -*** Settings *** -Documentation Test suite for RESTCONF RPC CAR PERSON -Library Collections -Library ../../../../libraries/RequestsLibrary.py -Library ../../../../libraries/Common.py -Library ../../../../libraries/CrudLibrary.py -Library ../../../../libraries/SettingsLibrary.py -Library ../../../../libraries/UtilLibrary.py -Variables ../../../../variables/Variables.py - -*** Variables *** -${REST_CONTEXT} /restconf/config/ - - -*** Test Cases *** -Add cars and get cars from Leader - [Documentation] Add 100 cars and get added cars from Leader - ${resp} AddCar ${FOLLOWER1} ${PORT} ${100} - ${resp} Getcars ${FOLLOWER1} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} manufacturer1 - -Add persons and get persons from Leader - [Documentation] Add 100 persons and get persons - [Documentation] Note: There should be one person added first to enable rpc - ${resp} AddPerson ${FOLLOWER1} ${PORT} ${0} - ${resp} AddPerson ${FOLLOWER1} ${PORT} ${100} - ${resp} GetPersons ${FOLLOWER1} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user5 - -Add car-person mapping and get car-person mapping from Leader - [Documentation] Add car-person and get car-person from Leader - [Documentation] Note: This is done to enable working of rpc - - ${resp} AddCarPerson ${FOLLOWER1} ${PORT} ${0} - ${resp} GetCarPersonMappings ${FOLLOWER1} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user0 - -Purchase 100 cars using Leader - [Documentation] Purchase 100 cars using Leader - - ${resp} BuyCar ${FOLLOWER1} ${PORT} ${100} - ${resp} GetCarPersonMappings ${FOLLOWER1} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - -Get car-person mappings using Leader - [Documentation] Get car-person mappings using Leader to see 100 entry - ${resp} GetCarPersonMappings ${FOLLOWER1} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user100 - -Get car-person mappings using Leader - [Documentation] Get car-person mappings using Leader to see 100 entry - ${resp} GetCarPersonMappings ${LEADER} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user100 - Should Contain ${resp.content} user5 - - -Get car-person mappings using Follower2 - [Documentation] Get car-person mappings using Follower2 to see 100 entry - ${resp} GetCarPersonMappings ${FOLLOWER2} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user0 - Should Contain ${resp.content} user100 diff --git a/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_03_execute_on_follower2.txt b/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_03_execute_on_follower2.txt deleted file mode 100644 index 0ccf3c1755..0000000000 --- a/test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_03_execute_on_follower2.txt +++ /dev/null @@ -1,67 +0,0 @@ -*** Settings *** -Documentation Test suite for RESTCONF RPC CAR PERSON -Library Collections -Library ../../../../libraries/RequestsLibrary.py -Library ../../../../libraries/Common.py -Library ../../../../libraries/CrudLibrary.py -Library ../../../../libraries/SettingsLibrary.py -Library ../../../../libraries/UtilLibrary.py -Variables ../../../../variables/Variables.py - -*** Variables *** -${REST_CONTEXT} /restconf/config/ - - -*** Test Cases *** -Add cars and get cars from Leader - [Documentation] Add 100 cars and get added cars from Leader - ${resp} AddCar ${FOLLOWER2} ${PORT} ${100} - ${resp} Getcars ${FOLLOWER2} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} manufacturer1 - -Add persons and get persons from Leader - [Documentation] Add 100 persons and get persons - [Documentation] Note: There should be one person added first to enable rpc - ${resp} AddPerson ${FOLLOWER2} ${PORT} ${0} - ${resp} AddPerson ${FOLLOWER2} ${PORT} ${100} - ${resp} GetPersons ${FOLLOWER2} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user5 - -Add car-person mapping and get car-person mapping from Leader - [Documentation] Add car-person and get car-person from Leader - [Documentation] Note: This is done to enable working of rpc - - ${resp} AddCarPerson ${FOLLOWER2} ${PORT} ${0} - ${resp} GetCarPersonMappings ${FOLLOWER2} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user0 - -Purchase 100 cars using Leader - [Documentation] Purchase 100 cars using Leader - - ${resp} BuyCar ${FOLLOWER2} ${PORT} ${100} - ${resp} GetCarPersonMappings ${FOLLOWER2} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - -Get car-person mappings using Leader - [Documentation] Get car-person mappings using Leader to see 100 entry - ${resp} GetCarPersonMappings ${FOLLOWER2} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user100 - -Get car-person mappings using Leader - [Documentation] Get car-person mappings using Leader to see 100 entry - ${resp} GetCarPersonMappings ${LEADER} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user100 - Should Contain ${resp.content} user5 - - -Get car-person mappings using Follower1 - [Documentation] Get car-person mappings using Follower1 to see 100 entry - ${resp} GetCarPersonMappings ${FOLLOWER1} ${PORT} ${0} - Should Be Equal As Strings ${resp.status_code} 200 - Should Contain ${resp.content} user0 - Should Contain ${resp.content} user100 diff --git a/test/csit/suites/clustering/datastore/basic/020_restconf_rpc_crud_test_02_execute_on_follower1.txt b/test/csit/suites/clustering/datastore/basic/020_restconf_rpc_crud_test_02_execute_on_follower1.txt new file mode 100644 index 0000000000..8b54e98351 --- /dev/null +++ b/test/csit/suites/clustering/datastore/basic/020_restconf_rpc_crud_test_02_execute_on_follower1.txt @@ -0,0 +1,81 @@ +*** Settings *** +Documentation Test suite for testing Distributed Datastore main operations performed from follower1 + +Library Collections +Library ../../../../libraries/RequestsLibrary.py +Library ../../../../libraries/Common.py +Library ../../../../libraries/CrudLibrary.py +Library ../../../../libraries/SettingsLibrary.py +Library ../../../../libraries/UtilLibrary.py +Library ../../../../libraries/ClusterStateLibrary.py +Variables ../../../../variables/Variables.py + +*** Variables *** +${REST_CONTEXT} /restconf/config/ +${SHARD_CAR_NAME} shard-car-config +${SHARD_PEOPLE_NAME} shard-people-config +${SHARD_CAR_PERSON_NAME} shard-car-people-config + + +*** Test Cases *** +Add cars and get cars from Follower1 + [Documentation] Add 100 cars and get added cars from Follower1 + ${FOLLOWERS} GetFollowers ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Log ${FOLLOWERS} + SET SUITE VARIABLE ${FOLLOWERS} + + ${resp} AddCar ${FOLLOWERS[0]} ${PORT} ${100} + Sleep 1 + ${resp} Getcars ${FOLLOWERS[0]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} manufacturer1 + +Add persons and get persons from Follower1 + [Documentation] Add 100 persons and get persons from Follower1 + [Documentation] Note: There should be one person added first to enable rpc + ${resp} AddPerson ${FOLLOWERS[0]} ${PORT} ${0} + ${resp} AddPerson ${FOLLOWERS[0]} ${PORT} ${100} + Sleep 1 + ${resp} GetPersons ${FOLLOWERS[0]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user5 + +Add car-person mapping and get car-person mapping from Follower1 + [Documentation] Add car-person and get car-person from Follower1 + [Documentation] Note: This is done to enable working of rpc + + ${resp} AddCarPerson ${FOLLOWERS[0]} ${PORT} ${0} + ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user0 + +Purchase 100 cars using Follower1 + [Documentation] Purchase 100 cars using Follower1 + + ${resp} BuyCar ${FOLLOWERS[0]} ${PORT} ${100} + Sleep 1 + ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + +Get car-person mappings using Follower1 + [Documentation] Get car-person mappings using follower1 to see 100 entry + ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user100 + Should Contain ${resp.content} user5 + +Get car-person mappings using Leader + [Documentation] Get car-person mappings using Leader to see 100 entry + ${CURRENT_CAR_LEADER} GetLeader ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Log ${CURRENT_CAR_LEADER} + Sleep 1 + ${resp} GetCarPersonMappings ${CURRENT_CAR_LEADER} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user100 + +Get car-person mappings using Follower2 + [Documentation] Get car-person mappings using Follower2 to see 100 entry + ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user0 + Should Contain ${resp.content} user100 diff --git a/test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt b/test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt new file mode 100644 index 0000000000..8bc66955a1 --- /dev/null +++ b/test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt @@ -0,0 +1,81 @@ +*** Settings *** +Documentation Test suite for testing Distributed Datastore main operations performed from follower2 + +Library Collections +Library ../../../../libraries/RequestsLibrary.py +Library ../../../../libraries/Common.py +Library ../../../../libraries/CrudLibrary.py +Library ../../../../libraries/SettingsLibrary.py +Library ../../../../libraries/UtilLibrary.py +Library ../../../../libraries/ClusterStateLibrary.py +Variables ../../../../variables/Variables.py + +*** Variables *** +${REST_CONTEXT} /restconf/config/ +${SHARD_CAR_NAME} shard-car-config +${SHARD_PEOPLE_NAME} shard-people-config +${SHARD_CAR_PERSON_NAME} shard-car-people-config + + +*** Test Cases *** +Add cars and get cars from Follower2 + [Documentation] Add 100 cars and get added cars from Follower2 + ${FOLLOWERS} GetFollowers ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Log ${FOLLOWERS} + SET SUITE VARIABLE ${FOLLOWERS} + + ${resp} AddCar ${FOLLOWERS[1]} ${PORT} ${100} + Sleep 1 + ${resp} Getcars ${FOLLOWERS[1]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} manufacturer1 + +Add persons and get persons from Follower2 + [Documentation] Add 100 persons and get persons from Follower2 + [Documentation] Note: There should be one person added first to enable rpc + ${resp} AddPerson ${FOLLOWERS[1]} ${PORT} ${0} + ${resp} AddPerson ${FOLLOWERS[1]} ${PORT} ${100} + Sleep 1 + ${resp} GetPersons ${FOLLOWERS[1]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user5 + +Add car-person mapping and get car-person mapping from Follower2 + [Documentation] Add car-person and get car-person from Follower2 + [Documentation] Note: This is done to enable working of rpc + + ${resp} AddCarPerson ${FOLLOWERS[1]} ${PORT} ${0} + ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user0 + +Purchase 100 cars using Follower1 + [Documentation] Purchase 100 cars using Follower2 + + ${resp} BuyCar ${FOLLOWERS[1]} ${PORT} ${100} + Sleep 1 + ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + +Get car-person mappings using Follower2 + [Documentation] Get car-person mappings using follower2 to see 100 entry + ${resp} GetCarPersonMappings ${FOLLOWERS[1]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user100 + Should Contain ${resp.content} user5 + +Get car-person mappings using Leader + [Documentation] Get car-person mappings using Leader to see 100 entry + ${CURRENT_CAR_LEADER} GetLeader ${SHARD_CAR_PERSON_NAME} ${3} ${3} ${1} ${PORT} ${LEADER} ${FOLLOWER1} ${FOLLOWER2} + Log ${CURRENT_CAR_LEADER} + Sleep 1 + ${resp} GetCarPersonMappings ${CURRENT_CAR_LEADER} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user100 + +Get car-person mappings using Follower1 + [Documentation] Get car-person mappings using Follower1 to see 100 entry + ${resp} GetCarPersonMappings ${FOLLOWERS[0]} ${PORT} ${0} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.content} user0 + Should Contain ${resp.content} user100 -- 2.36.6