Increasing sleep after mininet to stabilize l2switch suite
[integration/test.git] / test / csit / suites / clustering / datastore / basic / 010_restconf_rpc_crud_test_03_execute_on_follower2.txt
1 *** Settings ***
2 Documentation     Test suite for RESTCONF RPC CAR PERSON 
3 Library           Collections
4 Library           ../../../../libraries/RequestsLibrary.py
5 Library           ../../../../libraries/Common.py
6 Library           ../../../../libraries/CrudLibrary.py
7 Library           ../../../../libraries/SettingsLibrary.py
8 Library           ../../../../libraries/UtilLibrary.py
9 Variables         ../../../../variables/Variables.py
10
11 *** Variables ***
12 ${REST_CONTEXT}    /restconf/config/
13
14
15 *** Test Cases *** 
16 Add cars and get cars from Leader 
17     [Documentation]    Add 100 cars and get added cars from Leader
18         ${resp}         AddCar  ${FOLLOWER2}    ${PORT} ${100}  
19         ${resp}         Getcars ${FOLLOWER2}    ${PORT} ${0}
20         Should Be Equal As Strings    ${resp.status_code}    200
21         Should Contain     ${resp.content}   manufacturer1      
22                 
23 Add persons and get persons from Leader 
24     [Documentation]    Add 100 persons and get persons
25     [Documentation]    Note: There should be one person added first to enable rpc
26         ${resp}         AddPerson       ${FOLLOWER2}    ${PORT} ${0}    
27         ${resp}         AddPerson       ${FOLLOWER2}    ${PORT} ${100}  
28         ${resp}         GetPersons      ${FOLLOWER2}    ${PORT} ${0}
29         Should Be Equal As Strings    ${resp.status_code}    200
30         Should Contain     ${resp.content}   user5      
31
32 Add car-person mapping and get car-person mapping from Leader 
33     [Documentation]     Add car-person and get car-person from Leader 
34     [Documentation]  Note: This is done to enable working of rpc 
35
36         ${resp}         AddCarPerson    ${FOLLOWER2}    ${PORT} ${0}    
37         ${resp}         GetCarPersonMappings    ${FOLLOWER2}    ${PORT} ${0}
38         Should Be Equal As Strings    ${resp.status_code}    200
39         Should Contain     ${resp.content}   user0
40         
41 Purchase 100 cars using Leader 
42     [Documentation]  Purchase 100 cars using Leader
43
44         ${resp}         BuyCar  ${FOLLOWER2}    ${PORT} ${100}  
45         ${resp}         GetCarPersonMappings    ${FOLLOWER2}    ${PORT} ${0}
46         Should Be Equal As Strings    ${resp.status_code}    200
47
48 Get car-person mappings using Leader
49    [Documentation]      Get car-person mappings using Leader to see 100 entry
50         ${resp}         GetCarPersonMappings    ${FOLLOWER2}    ${PORT} ${0}
51         Should Be Equal As Strings    ${resp.status_code}    200
52         Should Contain     ${resp.content}   user100
53
54 Get car-person mappings using Leader
55    [Documentation]      Get car-person mappings using Leader to see 100 entry
56         ${resp}         GetCarPersonMappings    ${LEADER}       ${PORT} ${0}
57         Should Be Equal As Strings    ${resp.status_code}    200
58         Should Contain     ${resp.content}   user100
59         Should Contain     ${resp.content}   user5
60
61
62 Get car-person mappings using Follower1
63    [Documentation]      Get car-person mappings using Follower1 to see 100 entry
64         ${resp}         GetCarPersonMappings    ${FOLLOWER1}    ${PORT} ${0}
65         Should Be Equal As Strings    ${resp.status_code}    200
66         Should Contain     ${resp.content}   user0
67         Should Contain     ${resp.content}   user100