Update Robot Framework format - step 14
[integration/test.git] / csit / suites / sxp / binding-origin / 010_Binding_Origins_Configuration.robot
1 *** Settings ***
2 Documentation       Test suite to verify binding origins configuration possibilities (CRUD)
3
4 Library             RequestsLibrary
5 Resource            ../../../libraries/SxpBindingOriginsLib.robot
6
7 Suite Setup         SxpLib.Setup SXP Environment    0
8 Suite Teardown      SxpLib.Clean SXP Environment    0
9 Test Setup          SxpBindingOriginsLib.Revert To Default Binding Origins Configuration
10
11
12 *** Variables ***
13 @{DEFAULT_ORIGINS}          LOCAL    NETWORK
14 @{CLUSTER}                  CLUSTER
15 @{DEFAULT_AND_CLUSTER}      LOCAL    NETWORK    CLUSTER
16
17
18 *** Test Cases ***
19 Test Add Binding Origin
20     [Documentation]    Test if binding origin is added to configuration
21     [Tags]    binding origins crud    sxp
22     SxpBindingOriginsLib.Add Binding Origin    CLUSTER    0
23     SxpBindingOriginsLib.Should Contain Binding Origins    @{DEFAULT_AND_CLUSTER}
24
25 Test Add Binding Origin With Already Used Origin Type
26     [Documentation]    Test if binding origin with already used origin type cannot be added to configuration
27     [Tags]    binding origins crud    sxp
28     BuiltIn.Run Keyword And Expect Error
29     ...    RPC result is False
30     ...    SxpBindingOriginsLib.Add Binding Origin
31     ...    LOCAL
32     ...    0
33
34 Test Add Binding Origin With Already Used Priority
35     [Documentation]    Test if binding origin with already used priotity cannot be added to configuration
36     [Tags]    binding origins crud    sxp
37     BuiltIn.Run Keyword And Expect Error
38     ...    RPC result is False
39     ...    SxpBindingOriginsLib.Add Binding Origin
40     ...    CLUSTER
41     ...    1
42
43 Test Update Binding Origin
44     [Documentation]    Test if binding origin is updated in configuration
45     [Tags]    binding origins crud    sxp
46     BuiltIn.Comment    Update default origin
47     SxpBindingOriginsLib.Update Binding Origin    LOCAL    0
48     BuiltIn.Comment    Verify that LOCAL origin priority is updated
49     SxpBindingOriginsLib.Should Contain Binding Origin With Priority    LOCAL    0
50
51 Test Update Binding Origin Of Unknown Origin Type
52     [Documentation]    Test if unknown origin cannot be updated
53     [Tags]    binding origins crud    sxp
54     BuiltIn.Run Keyword And Expect Error
55     ...    RPC result is False
56     ...    SxpBindingOriginsLib.Update Binding Origin
57     ...    CLUSTER
58     ...    0
59
60 Test Update Binding Origin With Already Used Priority
61     [Documentation]    Test if binding origin cannot be updated to use priority of another binding origin
62     [Tags]    binding origins crud    sxp
63     BuiltIn.Run Keyword And Expect Error
64     ...    RPC result is False
65     ...    SxpBindingOriginsLib.Update Binding Origin
66     ...    LOCAL
67     ...    2
68
69 Test Delete Binding Origin
70     [Documentation]    Test if binding origin is deleted from configuration
71     [Tags]    binding origins crud    sxp
72     BuiltIn.Comment    Add CLUSTER origin and verify it is added
73     SxpBindingOriginsLib.Add Binding Origin    CLUSTER    0
74     SxpBindingOriginsLib.Should Contain Binding Origins    @{DEFAULT_AND_CLUSTER}
75     BuiltIn.Comment    Delete CLUSTER origin
76     SxpBindingOriginsLib.Delete Binding Origin    CLUSTER
77     BuiltIn.Comment    Verify that CLUSTER origin is no more present
78     SxpBindingOriginsLib.Should Not Contain Binding Origins    CLUSTER
79
80 Test Delete Default Binding Origin
81     [Documentation]    Test that default binding origin cannot be deleted from configuration
82     [Tags]    binding origins crud    sxp
83     BuiltIn.Comment    Try to delete default origin
84     BuiltIn.Run Keyword And Expect Error    RPC result is False    SxpBindingOriginsLib.Delete Binding Origin    LOCAL
85     BuiltIn.Comment    Verify all default origins are preserved
86     SxpBindingOriginsLib.Should Contain Binding Origins    @{DEFAULT_ORIGINS}