Tidy for clustering test suite.
[integration/test.git] / test / csit / suites / clustering / datastore / 020_crud_on_any_follower.robot
1 *** Settings ***
2 Documentation     This test finds the followers of certain shards in a 3-Node cluster and executes CRUD operations on any one follower
3 Default Tags      3-node-cluster
4 Library           Collections
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 Resource          ../../../libraries/ClusterKeywords.txt
12 Variables         ../../../variables/Variables.py
13
14 *** Variables ***
15 ${REST_CONTEXT}    /restconf/config/
16 ${SHARD_CAR_NAME}    shard-car-config
17 ${SHARD_PEOPLE_NAME}    shard-people-config
18 ${SHARD_CAR_PERSON_NAME}    shard-car-people-config
19 ${NUM_ENTRIES}    ${40}
20
21 *** Test Cases ***
22 Get Car Followers
23     ${CAR_FOLLOWERS}    Get All Followers    ${SHARD_CAR_NAME}
24     Set Suite Variable    ${CAR_FOLLOWERS}
25
26 Get People Followers
27     ${PEOPLE_FOLLOWERS}    Get All Followers    ${SHARD_PEOPLE_NAME}
28     Set Suite Variable    ${PEOPLE_FOLLOWERS}
29
30 Get Car-Person Followers
31     ${CAR_PERSON_FOLLOWERS}    Get All Followers    ${SHARD_CAR_PERSON_NAME}
32     Set Suite Variable    ${CAR_PERSON_FOLLOWERS}
33
34 Delete cars from Follower1
35     Delete All Cars And Verify    @{CAR_FOLLOWERS}[0]
36
37 Delete people from Follower1
38     Delete All People And Verify    @{PEOPLE_FOLLOWERS}[0]
39
40 Delete car-persons from Follower1
41     Delete All Cars-Persons And Verify    @{CAR_PERSON_FOLLOWERS}[0]
42
43 Add cars and get cars from Follower1
44     [Documentation]    Add cars and get added cars from Follower1
45     Add Cars And Verify    @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
46
47 Get added cars from Follower2
48     [Documentation]    Get added cars from Follower2
49     Wait Until Keyword Succeeds    60s    2s    Get Cars And Verify    @{CAR_FOLLOWERS}[1]    ${NUM_ENTRIES}
50
51 Add people and get people from Follower1
52     [Documentation]    Add people and get people from Follower1
53     Add People And Verify    @{PEOPLE_FOLLOWERS}[0]    ${NUM_ENTRIES}
54
55 Get added people from Follower2
56     [Documentation]    Get added people from Follower2
57     Wait Until Keyword Succeeds    60s    2s    Get People And Verify    @{PEOPLE_FOLLOWERS}[1]    ${NUM_ENTRIES}
58
59 Add car-person mapping and get car-person mapping from Follower1
60     Add Car Person And Verify    @{CAR_PERSON_FOLLOWERS}[0]
61
62 Purchase cars on Follower1
63     [Documentation]    Purchase cars using Follower1
64     Buy Cars And Verify    @{CAR_PERSON_FOLLOWERS}[0]    ${NUM_ENTRIES}
65
66 Get car-person mappings from Follower1
67     [Documentation]    Get car-person mappings from Follower1 to see all entries
68     Wait Until Keyword Succeeds    60s    2s    Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[0]    ${NUM_ENTRIES}
69
70 Get car-person mappings from Leader
71     [Documentation]    Get car-person mappings from the Leader to see all entries
72     ${CURRENT_CAR_LEADER}    Wait For Leader    ${SHARD_CAR_PERSON_NAME}
73     Wait Until Keyword Succeeds    60s    2s    Get Car-Person Mappings And Verify    ${CURRENT_CAR_LEADER}    ${NUM_ENTRIES}
74
75 Get car-person mappings from Follower2
76     [Documentation]    Get car-person mappings from Follower2 to see all entries
77     Wait Until Keyword Succeeds    60s    2s    Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[1]    ${NUM_ENTRIES}