2f834ac4b6ada04877b18c3bd7612937e6a84eb4
[csit.git] / tests / func / honeycomb / mgmt-notif-apihcnc-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 # Interfaces to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 | ${tap_interface}= | tap_test
18 | &{tap_settings}= | tap-name=tap_test | mac=08:00:27:c0:5d:37
19 | ... | device-instance=${1}
20
21 *** Settings ***
22 | Resource | resources/libraries/robot/default.robot
23 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
24 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
25 | Resource | resources/libraries/robot/honeycomb/tap.robot
26 | Resource | resources/libraries/robot/honeycomb/notifications.robot
27 | ...
28 | Suite Setup | Run keywords
29 | ... | Honeycomb configures interface state
30 | ... | ${node} | ${interface} | down | AND
31 | ... | Honeycomb creates TAP interface
32 | ... | ${node} | ${tap_interface} | ${tap_settings}
33 | ...
34 | Documentation | *Honeycomb notifications test suite.*
35 | ...
36 | Force Tags | HC_FUNC
37 | ...
38 | Suite Teardown | Run Keyword If Any Tests Failed
39 | ... | Restart Honeycomb and VPP | ${node}
40
41 *** Test Cases ***
42 | TC01: Honeycomb sends notification on interface state change
43 | | [Documentation] | Check if Honeycomb sends a state-changed notification\
44 | | ... | when the state of an interface is changed.
45 | | ...
46 | | Given Interface state from Honeycomb should be
47 | | ... | ${node} | ${interface} | down
48 | | And Interface state from VAT should be | ${node} | ${interface} | down
49 | | And Notification listener should be established | ${node}
50 | | When Honeycomb configures interface state | ${node} | ${interface} | up
51 | | Then Honeycomb should send interface state notification | ${interface} | up
52 | | When Honeycomb configures interface state | ${node} | ${interface} | down
53 | | And Honeycomb should send interface state notification | ${interface} | down
54
55 | TC02: Honeycomb sends notification on interface deletion
56 | | [Documentation] | Check if Honeycomb sends an interface-deleted notification
57 | | ... | when an interface is deleted.
58 | | ...
59 | | Given TAP Operational Data From Honeycomb Should Be
60 | | ... | ${node} | ${tap_interface} | ${tap_settings}
61 | | And TAP Operational Data From VAT Should Be
62 | | ... | ${node} | ${tap_interface} | ${tap_settings}
63 | | And Notification listener should be established | ${node}
64 | | When Honeycomb removes TAP interface | ${node} | ${tap_interface}
65 | | Then Honeycomb should send interface deleted notification | ${tap_interface}