2b6802c205052eff7fff39db5662852ebaa03734
[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 | Suite Setup | Run keywords
28 | ... | Honeycomb sets interface state
29 | ... | ${node} | ${interface} | down | AND
30 | ... | Honeycomb creates TAP interface
31 | ... | ${node} | ${tap_interface} | ${tap_settings}
32 | Documentation | *Honeycomb notifications test suite.*
33 | Force Tags | honeycomb_sanity
34 | Suite Teardown | Run Keyword If Any Tests Failed
35 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
36
37 *** Test Cases ***
38 | TC01: Honeycomb sends notification on interface state change
39 | | [Documentation] | Check if Honeycomb sends a state-changed notification\
40 | | ... | when the state of an interface is changed.
41 | | Given Interface state from Honeycomb should be
42 | | ... | ${node} | ${interface} | down
43 | | And Interface state from VAT should be | ${node} | ${interface} | down
44 | | And Notification listener is established | ${node}
45 | | When Honeycomb sets interface state | ${node} | ${interface} | up
46 | | Then Honeycomb should send interface state notification | ${interface} | up
47 | | When Honeycomb sets interface state | ${node} | ${interface} | down
48 | | And Honeycomb should send interface state notification | ${interface} | down
49
50 | TC02: Honeycomb sends notification on interface deletion
51 | | [Documentation] | Check if Honeycomb sends an interface-deleted notification
52 | | ... | when an interface is deleted.
53 | | Given TAP configuration from Honeycomb should be
54 | | ... | ${node} | ${tap_interface} | ${tap_settings}
55 | | And TAP configuration from VAT should be
56 | | ... | ${node} | ${tap_interface} | ${tap_settings}
57 | | And Notification listener is established | ${node}
58 | | When Honeycomb removes TAP interface | ${node} | ${tap_interface}
59 | | Then Honeycomb should send interface deleted notification | ${tap_interface}