renamed the test cases file name to contain proper
authorBasheeruddin Ahmed <syedbahm@cisco.com>
Thu, 11 Sep 2014 07:21:01 +0000 (00:21 -0700)
committerChristopher O'Shea <christopher.o.shea@ericsson.com>
Tue, 23 Sep 2014 20:42:31 +0000 (20:42 +0000)
sequence number

updated test cases to utilize getLeader api

Change-Id: I34ba798382587290d83cb71160b1ed0725d406e4
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
test/csit/libraries/ClusterStateLibrary.py
test/csit/libraries/CrudLibrary.py
test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_01_execute_on_leader.txt
test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_02_execute_on_follower1.txt [deleted file]
test/csit/suites/clustering/datastore/basic/010_restconf_rpc_crud_test_03_execute_on_follower2.txt [deleted file]
test/csit/suites/clustering/datastore/basic/020_restconf_rpc_crud_test_02_execute_on_follower1.txt [new file with mode: 0644]
test/csit/suites/clustering/datastore/basic/030_restconf_rpc_crud_test_03_execute_on_follower2.txt [new file with mode: 0644]

index fa0b9cdc6fed4cef2f404542c312a5e96db9d4cb..185bce874afba2a38cbed326be5eafb515876b0f 100644 (file)
@@ -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()
 
 
index 44cb149763971b88328776501b188b0f0b89fe86..bc603521e30c2cc95af067b632202de4789fd40e 100644 (file)
@@ -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
 #
index 8a37f895501a033e356e3b43e5d640dbc3765a67..3bf86cba992ce4204c4101b71a2373f9cc553e6a 100644 (file)
@@ -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 (file)
index ebd3d87..0000000
+++ /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 (file)
index 0ccf3c1..0000000
+++ /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 (file)
index 0000000..8b54e98
--- /dev/null
@@ -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 (file)
index 0000000..8bc6695
--- /dev/null
@@ -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