Fix Tap failing tests
[csit.git] / tests / honeycomb / func / 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_interface_vpp}= | tap0
19 | &{tap_settings}= | host-interface-name=tap_test | mac=08:00:27:c0:5d:37
20 | ... | id=${1}
21 | &{tap_settings_oper}= | host-interface-name=tap_test | device-name=tap0
22 | ... | mac=08:00:27:c0:5d:37 | rx_ring_sz=${256} | tx_ring_sz=${256} | id=${1}
23 | &{tap_settings_vat}= | dev_name=tap0 | mac=08:00:27:c0:5d:37
24 | ... | rx_ring_sz=${256} | tx_ring_sz=${256} | id=${1}
25
26 *** Settings ***
27 | Resource | resources/libraries/robot/shared/default.robot
28 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
29 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
30 | Resource | resources/libraries/robot/honeycomb/tap.robot
31 | Resource | resources/libraries/robot/honeycomb/notifications.robot
32 | ...
33 | Documentation | *Honeycomb notifications test suite.*
34 | ...
35 | Suite Setup | Set Up Honeycomb Notifications Functional Test Suite
36 | ...
37 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
38 | ...
39 | Force Tags | HC_FUNC
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_oper}
61 | | And TAP Operational Data From VAT Should Be
62 | | ... | ${node} | ${tap_interface_vpp} | ${tap_settings_vat}
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}
66
67 *** Keywords ***
68 | Set Up Honeycomb Notifications Functional Test Suite
69 | | Set Up Honeycomb Functional Test Suite | ${node}
70 | | Honeycomb configures interface state
71 | | ... | ${node} | ${interface} | down
72 | | Honeycomb creates TAP interface
73 | | ... | ${node} | ${tap_interface} | ${tap_settings}