aa8ff496f2e1d4e38b956154482309960a2eac66
[integration/test.git] / csit / suites / controller / 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 Resource          ../../../libraries/ClusterKeywords.robot
5 Resource          ../../../libraries/CarsAndPeople.robot
6 Variables         ../../../variables/Variables.py
7
8 *** Variables ***
9 ${SHARD_CAR_NAME}    shard-car-config
10 ${SHARD_PEOPLE_NAME}    shard-people-config
11 ${SHARD_CAR_PERSON_NAME}    shard-car-people-config
12 ${NUM_ENTRIES}    ${40}
13
14 *** Test Cases ***
15 Get Car Followers
16     [Documentation]    Find followers in the car shard
17     ${CAR_FOLLOWERS}    Get All Followers    ${SHARD_CAR_NAME}
18     Set Suite Variable    ${CAR_FOLLOWERS}
19
20 Get People Followers
21     [Documentation]    Find followers in the people shard
22     ${PEOPLE_FOLLOWERS}    Get All Followers    ${SHARD_PEOPLE_NAME}
23     Set Suite Variable    ${PEOPLE_FOLLOWERS}
24
25 Get Car-Person Followers
26     ${CAR_PERSON_FOLLOWERS}    Get All Followers    ${SHARD_CAR_PERSON_NAME}
27     Set Suite Variable    ${CAR_PERSON_FOLLOWERS}
28
29 Delete Cars From Follower1
30     Delete All Cars And Verify    @{CAR_FOLLOWERS}[0]
31
32 Delete People From Follower1
33     Delete All People And Verify    @{PEOPLE_FOLLOWERS}[0]
34
35 Delete Car-Persons from Follower1
36     Delete All Cars-Persons And Verify    @{CAR_PERSON_FOLLOWERS}[0]
37
38 Add Cars And Get Cars From Follower1
39     [Documentation]    Add cars and get added cars from Follower1
40     Add Cars And Verify    @{CAR_FOLLOWERS}[0]    ${NUM_ENTRIES}
41
42 Get Added Cars From Follower2
43     [Documentation]    Get added cars from Follower2
44     Get Cars And Verify    @{CAR_FOLLOWERS}[1]    ${NUM_ENTRIES}
45
46 Add People And Get People From Follower1
47     [Documentation]    Add people and get people from Follower1
48     Add People And Verify    @{PEOPLE_FOLLOWERS}[0]    ${NUM_ENTRIES}
49
50 Get Added People From Follower2
51     [Documentation]    Get added people from Follower2
52     Get People And Verify    @{PEOPLE_FOLLOWERS}[1]    ${NUM_ENTRIES}
53
54 Add Car-Person Mapping And Get Car-Person Mapping From Follower1
55     Add Car Person And Verify    @{CAR_PERSON_FOLLOWERS}[0]
56
57 Purchase Cars On Follower1
58     [Documentation]    Purchase cars using Follower1
59     Buy Cars And Verify    @{CAR_PERSON_FOLLOWERS}[0]    ${NUM_ENTRIES}
60
61 Get Car-Person Mappings From Follower1
62     [Documentation]    Get car-person mappings from Follower1 to see all entries
63     Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[0]    ${NUM_ENTRIES}
64
65 Get Car-Person Mappings From Leader
66     [Documentation]    Get car-person mappings from the Leader to see all entries
67     ${CURRENT_CAR_LEADER}    Get Leader And Verify    ${SHARD_CAR_PERSON_NAME}
68     Get Car-Person Mappings And Verify    ${CURRENT_CAR_LEADER}    ${NUM_ENTRIES}
69
70 Get Car-Person Mappings From Follower2
71     [Documentation]    Get car-person mappings from Follower2 to see all entries
72     Get Car-Person Mappings And Verify    @{CAR_PERSON_FOLLOWERS}[1]    ${NUM_ENTRIES}