28746e66fb278ae345e6b0dcd544b383f7aa64cc
[csit.git] / tests / 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/default.robot
20 | Resource | resources/libraries/robot/honeycomb/persistence.robot
21 | Suite Setup | Run Keywords
22 | ... | Configure Persistence | ${node} | enable | AND
23 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
24 | Suite Teardown | Configure Persistence | ${node} | disable
25 | Force Tags | honeycomb_sanity
26 | Documentation | *Honeycomb configuration persistence test suite.*
27
28 *** Test Cases ***
29 | TC01: Honeycomb persists configuration through restart of both Honeycomb and VPP
30 | | [Documentation] | Checks if Honeycomb maintains configuration after both\
31 | | ... | Honeycomb and VPP are restarted.
32 # Vxlan tunnel name is sometimes not properly restored (HC2VPP-47)
33 | | [Tags] | EXPECTED_FAILING
34 | | Given Honeycomb configures every setting | ${node} | ${interface}
35 | | And Honeycomb and VPP should verify every setting | ${node} | ${interface}
36 | | And Log persisted configuration on node | ${node}
37 | | When Honeycomb and VPP are restarted | ${node}
38 | | Then Honeycomb and VPP should verify every setting | ${node} | ${interface}
39 | | And Honeycomb should show no rogue interfaces | ${node}
40
41 | TC02: Honeycomb persists configuration through restart of Honeycomb
42 | | [Documentation] | Checks if Honeycomb maintains configuration after it\
43 | | ... | is restarted.
44 # Vxlan tunnel name is sometimes not properly restored (HC2VPP-47)
45 | | [Tags] | EXPECTED_FAILING
46 | | Given Honeycomb and VPP should verify every setting | ${node} | ${interface}
47 | | And Log persisted configuration on node | ${node}
48 | | When Honeycomb is restarted | ${node}
49 | | Then Honeycomb and VPP should verify every setting | ${node} | ${interface}
50 | | And Honeycomb should show no rogue interfaces | ${node}
51
52 | TC03: Honeycomb persists configuration through restart of VPP
53 | | [Documentation] | Checks if Honeycomb updates VPP settings after VPP is\
54 | | ... | restarted.
55 # Vxlan tunnel name is sometimes not properly restored (HC2VPP-47)
56 | | [Tags] | EXPECTED_FAILING
57 | | Given Honeycomb and VPP should verify every setting | ${node} | ${interface}
58 | | And Log persisted configuration on node | ${node}
59 | | When VPP is restarted | ${node}
60 | | Then Honeycomb and VPP should verify every setting | ${node} | ${interface}
61 | | And Honeycomb should show no rogue interfaces | ${node}
62
63 | TC04: Honeycomb reverts to defaults if persistence files are invalid
64 | | [Documentation] | Checks if Honeycomb reverts to default configuration when\
65 | | ... | persistence files are damaged or invalid.
66 | | [Teardown] | Run keyword if test failed
67 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
68 | | When Persistence file is damaged during restart | ${node}
69 | | Then Honeycomb and VPP should have default configuration | ${node}