GIT restructure - Adding project folders and features
[integration/test.git] / test / csit / suites / controller / MD_SAL_Cluster_Routed_RPC / 023_routed_rpc_crud_test.txt
1 *** Settings ***
2 Documentation     Test suite for Routed RPC. 
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  ${MEMBER1}      ${PORT} ${100}  
19         ${resp}         Getcars ${MEMBER1}      ${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       ${MEMBER1}      ${PORT} ${0}    
27         ${resp}         AddPerson       ${MEMBER1}      ${PORT} ${100}  
28         ${resp}         GetPersons      ${MEMBER1}      ${PORT} ${0}
29         Should Be Equal As Strings    ${resp.status_code}    200
30         Should Contain     ${resp.content}   user5
31         SLEEP   10      
32
33 Add car-person mapping and get car-person mapping from Follower1
34     [Documentation]     Add car-person and get car-person from Leader
35     [Documentation]     Note: This is done to enable working of rpc
36         ${resp}         AddCarPerson    ${MEMBER2}      ${PORT} ${0}
37         ${resp}         GetCarPersonMappings    ${MEMBER2}      ${PORT} ${0}
38         Should Be Equal As Strings      ${resp.status_code}     200
39         Should Contain  ${resp.content} user0
40         SLEEP   5
41
42 Purchase 100 cars using Follower1 
43     [Documentation]  Purchase 100 cars using Follower1
44         ${resp}         BuyCar  ${MEMBER2}      ${PORT} ${100}
45         ${resp}         GetCarPersonMappings    ${MEMBER2}      ${PORT} ${0}
46         Should Be Equal As Strings    ${resp.status_code}    200
47
48 Get Cars from Leader
49     [Documentation]    Get 100 using Leader
50         ${resp}         Getcars ${MEMBER1}      ${PORT} ${0}
51         Should Be Equal As Strings    ${resp.status_code}    200
52         Should Contain     ${resp.content}   manufacturer99
53
54 Get persons from Leader
55     [Documentation]    Get 101 Persons from Leader
56         ${resp}         GetPersons      ${MEMBER1}      ${PORT} ${0}
57         Should Be Equal As Strings    ${resp.status_code}    200
58         Should Contain     ${resp.content}   user100
59
60 Get car-person mappings using Leader
61    [Documentation]      Get 101 car-person mappings using Leader to see 100 entry
62         ${resp}         GetCarPersonMappings    ${MEMBER1}      ${PORT} ${0}
63         Should Be Equal As Strings    ${resp.status_code}    200
64         Should Contain     ${resp.content}   user100