5769ea0e735d3b32b1cf2d83ab57124e8fa64a94
[csit.git] / tests / suites / honeycomb / 9 - notification.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 # Node and interfaces to run tests on.
16 | ${node}= | ${nodes['DUT1']}
17 | ${interface}= | ${node['interfaces']['port1']['name']}
18 | ${tap_interface}= | tap_test
19 | &{tap_settings}= | tap-name=tap_test | mac=08:00:27:c0:5d:37
20 | ... | device-instance=${1}
21
22 *** Settings ***
23 | Resource | resources/libraries/robot/default.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
35 *** Test Cases ***
36 | Honeycomb sends notification on interface state change
37 | | [Documentation] | Check if Honeycomb sends a state-changed notification\
38 | | ... | when the state of an interface is changed.
39 | | Given Interface state from Honeycomb should be
40 | | ... | ${node} | ${interface} | down
41 | | And Interface state from VAT should be | ${node} | ${interface} | down
42 | | And Notification listener is established | ${node}
43 | | When Honeycomb sets interface state | ${node} | ${interface} | up
44 | | Then Honeycomb should send interface state notification | ${interface} | up
45 | | When Honeycomb sets interface state | ${node} | ${interface} | down
46 | | And Honeycomb should send interface state notification | ${interface} | down
47
48 | Honeycomb sends notification on interface deletion
49 | | [Documentation] | Check if Honeycomb sends an interface-deleted notification
50 | | ... | when an interface is deleted.
51 | | Given TAP configuration from Honeycomb should be
52 | | ... | ${node} | ${tap_interface} | ${tap_settings}
53 | | And TAP configuration from VAT should be
54 | | ... | ${node} | ${tap_interface} | ${tap_settings}
55 | | And Notification listener is established | ${node}
56 | | When Honeycomb removes TAP interface | ${node} | ${tap_interface}
57 | | Then Honeycomb should send interface deleted notification | ${tap_interface}