117f024b21ae051255aa3f3eb59d6e6631105810
[csit.git] / tests / suites / honeycomb / 070_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 # 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/interfaces.robot
24 | Resource | resources/libraries/robot/honeycomb/tap.robot
25 | Resource | resources/libraries/robot/honeycomb/notifications.robot
26 | Suite Setup | Run keywords
27 | ... | Honeycomb sets interface state
28 | ... | ${node} | ${interface} | down | AND
29 | ... | Honeycomb creates TAP interface
30 | ... | ${node} | ${tap_interface} | ${tap_settings}
31 | Documentation | *Honeycomb notifications test suite.*
32 | Force Tags | honeycomb_sanity
33
34 *** Test Cases ***
35 | Honeycomb sends notification on interface state change
36 | | [Documentation] | Check if Honeycomb sends a state-changed notification\
37 | | ... | when the state of an interface is changed.
38 | | Given Interface state from Honeycomb should be
39 | | ... | ${node} | ${interface} | down
40 | | And Interface state from VAT should be | ${node} | ${interface} | down
41 | | And Notification listener is established | ${node}
42 | | When Honeycomb sets interface state | ${node} | ${interface} | up
43 | | Then Honeycomb should send interface state notification | ${interface} | up
44 | | When Honeycomb sets interface state | ${node} | ${interface} | down
45 | | And Honeycomb should send interface state notification | ${interface} | down
46
47 | Honeycomb sends notification on interface deletion
48 | | [Documentation] | Check if Honeycomb sends an interface-deleted notification
49 | | ... | when an interface is deleted.
50 | | Given TAP configuration from Honeycomb should be
51 | | ... | ${node} | ${tap_interface} | ${tap_settings}
52 | | And TAP configuration from VAT should be
53 | | ... | ${node} | ${tap_interface} | ${tap_settings}
54 | | And Notification listener is established | ${node}
55 | | When Honeycomb removes TAP interface | ${node} | ${tap_interface}
56 | | Then Honeycomb should send interface deleted notification | ${tap_interface}