HC Test: Fix intermittent failures of HC startup
[csit.git] / tests / vpp / func / honeycomb / mgmt-statepersist-apihc-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Variables***
15 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17
18 *** Settings ***
19 | Resource | resources/libraries/robot/shared/default.robot
20 | Resource | resources/libraries/robot/honeycomb/persistence.robot
21 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
22 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
23 | Resource | resources/libraries/robot/honeycomb/l2_fib.robot
24 | ...
25 | Suite Setup | Run Keywords
26 | ... | Configure Persistence | ${node} | enable | AND
27 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
28 | ...
29 | Suite Teardown | Configure Persistence | ${node} | disable
30 | ...
31 | Force Tags | HC_PERSIST | HC_REST_ONLY
32 | ...
33 | Documentation | *Honeycomb configuration persistence test suite.*
34
35 *** Test Cases ***
36 # multi-feature cases
37 # ===================
38 | TC01: Honeycomb persists configuration through restart of both Honeycomb and VPP
39 | | [Documentation] | Checks if Honeycomb maintains configuration after both\
40 | | ... | Restart Honeycomb and VPP.
41 | | ...
42 | | [Teardown]
43 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
44 | | ...
45 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
46 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
47 | | And Log persisted configuration on node | ${node}
48 | | When Restart Honeycomb and VPP in pesistence test | ${node}
49 | | Then Multi-Feature persistence Test Verification | ${node} | ${interface}
50
51 | TC02: Honeycomb reverts to defaults if persistence files are invalid
52 | | [Documentation] | Checks if Honeycomb reverts to default configuration when\
53 | | ... | persistence files are damaged or invalid.
54 | | ...
55 | | [Tags] | HC_FUNC
56 | | ...
57 | | [Teardown]
58 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
59 | | ...
60 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
61 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
62 | | When Persistence file is damaged during restart | ${node}
63 | | Then Honeycomb and VPP should have default configuration | ${node}
64
65 | TC03: Honeycomb persists configuration through restart of Honeycomb
66 | | [Documentation] | Checks if Honeycomb maintains configuration after it\
67 | | ... | is restarted.
68 | | ...
69 | | [Teardown]
70 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
71 | | ...
72 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
73 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
74 | | And Log persisted configuration on node | ${node}
75 | | When Restart Honeycomb | ${node}
76 | | Then Multi-Feature persistence Test Verification | ${node} | ${interface}
77
78 | TC04: Honeycomb persists configuration through restart of VPP
79 | | [Documentation] | Checks if Honeycomb updates VPP settings after VPP is\
80 | | ... | restarted.
81 | | ...
82 | | [Teardown]
83 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
84 | | ...
85 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
86 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
87 | | And Log persisted configuration on node | ${node}
88 | | When Restart VPP | ${node}
89 | | Then Multi-Feature persistence Test Verification | ${node} | ${interface}
90
91 # single-feature cases
92 # ====================
93
94 | TC05: Persist configuration of IP addresses and neighbors - HC and VPP restart
95 | | [Documentation] | Verify persistence of interface state, IPv4 address
96 | | ... | and neighbor entries through restart of both Honeycomb and VPP.
97 | | ...
98 | | [Teardown]
99 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
100 | | ...
101 | | Given Interface Persistence Setup | ${node}
102 | | And Interface Persistence Check | ${node}
103 | | When Restart Honeycomb and VPP in pesistence test | ${node}
104 | | Then Interface Persistence Check | ${node}
105
106 | TC06: Persist configuration of IP addresses and neighbors - HC restart
107 | | [Documentation] | Verify persistence of interface state, IPv4 address
108 | | ... | and neighbor entries through restart of Honeycomb.
109 | | ...
110 | | [Teardown]
111 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
112 | | ...
113 | | Given Interface Persistence Setup | ${node}
114 | | And Interface Persistence Check | ${node}
115 | | When Restart Honeycomb | ${node}
116 | | Then Interface Persistence Check | ${node}
117
118 | TC07: Persist configuration of IP addresses and neighbors - VPP restart
119 | | [Documentation] | Verify persistence of interface state, IPv4 address
120 | | ... | and neighbor entries through restart of VPP.
121 | | ...
122 | | [Teardown]
123 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
124 | | ...
125 | | Given Interface Persistence Setup | ${node}
126 | | And Interface Persistence Check | ${node}
127 | | When Restart VPP | ${node}
128 | | Then Interface Persistence Check | ${node}
129
130 | TC08: Honeycomb persists configuration of bridge domains - HC and VPP restart
131 | | [Documentation] | Verify persistence of bridge domain, L2-FIB entry
132 | | ... | and Bridge domain Operational Interface Assignment through restart
133 | | ... | of both Honeycomb and VPP.
134 | | ...
135 | | [Teardown]
136 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
137 | | ...
138 | | Given Bridge Domain Persistence Setup | ${node}
139 | | When Restart Honeycomb and VPP in pesistence test | ${node}
140 | | Then Bridge Domain Persistence Check | ${node}
141
142 | TC09: Honeycomb persists configuration of bridge domains - HC restart
143 | | [Documentation] | Verify persistence of bridge domain, L2-FIB entry
144 | | ... | and Bridge domain Operational Interface Assignment through restart
145 | | ... | of Honeycomb.
146 | | ...
147 | | [Teardown]
148 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
149 | | ...
150 | | Given Bridge Domain Persistence Setup | ${node}
151 | | When Restart Honeycomb | ${node}
152 | | Then Bridge Domain Persistence Check | ${node}
153
154 | TC10: Honeycomb persists configuration of bridge domains - VPP restart
155 | | [Documentation] | Verify persistence of bridge domain, L2-FIB entry
156 | | ... | and Bridge domain Operational Interface Assignment through restart
157 | | ... | of VPP.
158 | | ...
159 | | [Teardown]
160 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
161 | | ...
162 | | Given Bridge Domain Persistence Setup | ${node}
163 | | When Restart VPP | ${node}
164 | | Then Bridge Domain Persistence Check | ${node}
165
166 #TODO: All other features