CSIT-687: Directory structure reorganization
[csit.git] / tests / tldk / func / ipv4 / ipv4_assemble.robot
1 # Copyright (c) 2017 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 *** Settings ***
15 | Library | resources.libraries.python.NodePath
16 | Library | resources.libraries.python.Trace
17 | Library | resources.libraries.python.TrafficScriptExecutor
18 | Library | resources.libraries.python.TLDK.UdpTest
19 | Resource | resources/libraries/robot/shared/default.robot
20 | Resource | resources/libraries/robot/shared/interfaces.robot
21 | Resource | resources/libraries/robot/shared/counters.robot
22 | Resource | resources/libraries/robot/tldk/tldk_utils.robot
23 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | FUNCTEST | TLDK
24 | Documentation | *TLDK IPv4 assemble test suite.*
25 | ...
26 | ... | Test suite uses 3-node topology TG - DUT1 - DUT2 - TG with single link
27 | ... | between nodes. From this topology only TG and DUT1 nodes are used.
28 | ... | In VM environment, the DUT2 is not configured since the DUT1 is testing
29 | ... | with the pcap file that generated with the pcap_gen.py. There is no 
30 | ... | packet going out to DUT2, udpfwd app is verified on DUT1 only.
31 | ... | This test case just use the pcap file for the UDP functional test.
32
33 *** Variables ***
34 | ${tc01_file_prefix}= | test_ipv4_assemble
35
36 *** Test Cases ***
37 | TC01: TLDK IPv4 assemble test case
38 | | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']}
39 | | And Pick out the port used to execute test
40 | | And Get the pcap data | ${tc01_file_prefix}
41 | | When Exec the udpfwd test | ${dut_node} | ${dut_port}
42 | | ... | ${tc01_file_prefix} | ${dest_ip} | ${is_ipv4}
43 | | ${pkt_count}= | Get the test result | ${dut_node}
44 | | ... | ${tc01_file_prefix}
45 | | ${result}= | Convert To Integer | ${pkt_count}
46 | | Then Should Be Equal As Integers | ${result} | 1