aboutsummaryrefslogtreecommitdiffstats
path: root/tests/suites
diff options
context:
space:
mode:
Diffstat (limited to 'tests/suites')
-rw-r--r--tests/suites/lisp/lisp_api_untagged.robot42
-rw-r--r--tests/suites/lisp/lisp_dataplane_untagged.robot55
-rw-r--r--tests/suites/lisp/resources/lisp_api_resources.py52
3 files changed, 134 insertions, 15 deletions
diff --git a/tests/suites/lisp/lisp_api_untagged.robot b/tests/suites/lisp/lisp_api_untagged.robot
index 1a0c309b91..8769b17e18 100644
--- a/tests/suites/lisp/lisp_api_untagged.robot
+++ b/tests/suites/lisp/lisp_api_untagged.robot
@@ -20,6 +20,8 @@
| Resource | resources/libraries/robot/default.robot
| Resource | resources/libraries/robot/interfaces.robot
| Resource | resources/libraries/robot/lisp/lisp_api.robot
+# import additional Lisp settings from resource file
+| Variables | tests/suites/lisp/resources/lisp_api_resources.py
| Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
| ... | VM_ENV | HW_ENV
| Test Setup | Run Keywords | Setup all DUTs before test
@@ -29,13 +31,20 @@
*** Variables ***
| ${locator_set_num}= | 3
-| ${eid_ipv4_num}= | 4
-| ${eid_ipv6_num}= | 3
-| ${map_resolver_ipv4_num}= | 3
-| ${map_resolver_ipv6_num}= | 2
*** Test Cases ***
+Vpp can enable and disable Lisp
+| | [Documentation] | Test lisp enable/disable API.
+| | ... | Enable lisp on the VPP node,
+| | ... | check if the lisp on the vpp node is enabled.
+| | ... | Then disable lisp on the vpp node and check if
+| | ... | the lisp is disabled on the vpp node.
+| | When Enable lisp | ${nodes['DUT1']}
+| | Then Check if lisp is enabled | ${nodes['DUT1']} | ${lisp_status}
+| | When Disable lisp | ${nodes['DUT1']}
+| | Then Check if lisp is disabled | ${nodes['DUT1']} | ${lisp_status}
+
| VPP can add and delete locator_set
| | [Documentation] | Test lisp locator_set API
| | ... | Set locator_set and locator on the VPP node,
@@ -45,8 +54,9 @@
| | ...
| | Given Lisp locator_set data is prepared
| | ... | ${nodes['DUT1']} | ${locator_set_num}
+| | And Enable lisp | ${nodes['DUT1']}
| | When Lisp locator_set data is set | ${nodes['DUT1']}
-| | Then Lisp locator_set is set correct | ${nodes['DUT1']}
+| | Then Lisp locator_set is set correctly | ${nodes['DUT1']}
| | When Delete all lisp locator_set from VPP | ${nodes['DUT1']}
| | Then Lisp locator_set should be unset | ${nodes['DUT1']}
@@ -60,8 +70,9 @@
| | ...
| | Given Lisp locator_set data use for test reset locator_set are prepared
| | ... | ${nodes['DUT1']} | ${locator_set_num}
+| | And Enable lisp | ${nodes['DUT1']}
| | When Lisp locator_set data is set | ${nodes['DUT1']}
-| | Then Lisp locator_set is set correct | ${nodes['DUT1']}
+| | Then Lisp locator_set is set correctly | ${nodes['DUT1']}
| | When Delete all lisp locator_set from VPP | ${nodes['DUT1']}
| | Then Lisp locator_set should be unset | ${nodes['DUT1']}
@@ -72,11 +83,11 @@
| | ... | Check if all eid IP address was unset
| | ... | from the VPP node.
| | ...
-| | Given Lisp eid address is prepared
-| | ... | ${nodes['DUT1']} | ${eid_ipv4_num} | ${eid_ipv6_num}
-| | When Lisp eid address is set | ${nodes['DUT1']}
-| | Then Lisp eid address is set correct to eid table | ${nodes['DUT1']}
-| | When Delete all lisp eid address from VPP | ${nodes['DUT1']}
+| | Given Enable lisp | ${nodes['DUT1']}
+| | When Lisp eid address is set | ${nodes['DUT1']} | ${eid_table}
+| | Then Lisp eid address is set correctly to eid table | ${nodes['DUT1']}
+| | ... | ${eid_table}
+| | When Delete all lisp eid address from VPP | ${nodes['DUT1']} | ${eid_table}
| | Then Lisp eid table should be empty | ${nodes['DUT1']}
| Vpp can add and delete lisp map resolver address
@@ -86,9 +97,10 @@
| | ... | Check if all map resolver address was unset
| | ... | from the VPP node.
| | ...
-| | Given Lisp map resolver address is prepared | ${nodes['DUT1']}
-| | ... | ${map_resolver_ipv4_num} | ${map_resolver_ipv6_num}
-| | When Lisp map resolver address is set | ${nodes['DUT1']}
-| | Then Lisp map resolver address is set correct | ${nodes['DUT1']}
+| | Given Enable lisp | ${nodes['DUT1']}
+| | When Lisp map resolver address is set | ${nodes['DUT1']} | ${map_resolver}
+| | Then Lisp map resolver address is set correctly | ${nodes['DUT1']}
+| | ... | ${map_resolver}
| | When Delete all lisp map resolver address from VPP | ${nodes['DUT1']}
+| | ... | ${map_resolver}
| | Then Lip map resolver address should be empty | ${nodes['DUT1']}
diff --git a/tests/suites/lisp/lisp_dataplane_untagged.robot b/tests/suites/lisp/lisp_dataplane_untagged.robot
index bdf290955e..7e952250d5 100644
--- a/tests/suites/lisp/lisp_dataplane_untagged.robot
+++ b/tests/suites/lisp/lisp_dataplane_untagged.robot
@@ -175,3 +175,58 @@
| | ... | ${tg_node} | ${tg2_ip6o4} | ${tg1_ip6o4}
| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
+
+| VPP can disable lisp and then re-enable it and everything should work
+| | [Documentation] | Test disable and enable Lisp.
+| | ... | Set Lisp and check if lisp work. Then disable Lisp
+| | ... | and check if it is disabled. At the end re-enable lisp
+| | ... | and check if Lisp is working.
+| | Given Path for 3-node testing is set
+| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
+| | And Interfaces in 3-node path are up
+| | And IP addresses are set on interfaces
+| | ... | ${dut1_node} | ${dut1_to_dut2}
+| | ... | ${dut1_to_dut2_ip4} | ${prefix4}
+| | ... | ${dut1_node} | ${dut1_to_tg}
+| | ... | ${dut1_to_tg_ip4} | ${prefix4}
+| | ... | ${dut2_node} | ${dut2_to_dut1}
+| | ... | ${dut2_to_dut1_ip4} | ${prefix4}
+| | ... | ${dut2_node} | ${dut2_to_tg}
+| | ... | ${dut2_to_tg_ip4} | ${prefix4}
+| | And VPP IP Probe | ${dut1_node} | ${dut1_to_dut2} | ${dut2_to_dut1_ip4}
+| | And VPP IP Probe | ${dut2_node} | ${dut2_to_dut1} | ${dut1_to_dut2_ip4}
+| | And Add Arp On Dut | ${dut2_node} | ${dut2_to_tg} | ${tg2_ip4}
+| | ... | ${tg_to_dut2_mac}
+| | And Add Arp On Dut | ${dut1_node} | ${dut1_to_tg} | ${tg1_ip4}
+| | ... | ${tg_to_dut1_mac}
+| | When Set up Lisp topology
+| | ... | ${dut1_node} | ${dut1_to_dut2} | ${NONE}
+| | ... | ${dut2_node} | ${dut2_to_dut1} | ${NONE}
+| | ... | ${duts_locator_set} | ${dut1_ip4_eid} | ${dut2_ip4_eid}
+| | ... | ${dut1_ip4_static_mapping} | ${dut2_ip4_static_mapping}
+| | Then Send Packet And Check Headers
+| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
+| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
+| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
+| | And Send Packet And Check Headers
+| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
+| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
+| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
+| | When Disable Lisp | ${dut1_node}
+| | Then Send packet from Port to Port should failed
+| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
+| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
+| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
+| | And Send packet from Port to Port should failed
+| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
+| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
+| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
+| | When Enable Lisp | ${dut1_node}
+| | Then Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers
+| | ... | ${tg_node} | ${tg1_ip4} | ${tg2_ip4}
+| | ... | ${tg_to_dut1} | ${tg_to_dut1_mac} | ${dut1_to_tg_mac}
+| | ... | ${tg_to_dut2} | ${dut2_to_tg_mac} | ${tg_to_dut2_mac}
+| | And Wait Until Keyword Succeeds | 2x | 5s | Send Packet And Check Headers
+| | ... | ${tg_node} | ${tg2_ip4} | ${tg1_ip4}
+| | ... | ${tg_to_dut2} | ${tg_to_dut2_mac} | ${dut2_to_tg_mac}
+| | ... | ${tg_to_dut1} | ${dut1_to_tg_mac} | ${tg_to_dut1_mac}
diff --git a/tests/suites/lisp/resources/lisp_api_resources.py b/tests/suites/lisp/resources/lisp_api_resources.py
new file mode 100644
index 0000000000..b7278a21e9
--- /dev/null
+++ b/tests/suites/lisp/resources/lisp_api_resources.py
@@ -0,0 +1,52 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Test variables for Lisp API test suite."""
+
+"""Lisp status example test data."""
+lisp_status = [[{"gpe_status":"disabled",
+ "feature_status":"disabled"}],
+ [{"gpe_status":"enabled",
+ "feature_status":"enabled"}]]
+
+"""Example lisp local eid we want set to VPP
+and then check if is set correct."""
+eid_table = [{'eid address': '192.168.0.1',
+ 'eid prefix len': 24,
+ 'locator-set': 'ls1'},
+ {'eid address': '192.168.1.1',
+ 'eid prefix len': 24,
+ 'locator-set': 'ls1'},
+ {'eid address': '192.168.2.1',
+ 'eid prefix len': 24,
+ 'locator-set': 'ls1'},
+ {'eid address': '192.168.3.1',
+ 'eid prefix len': 24,
+ 'locator-set': 'ls1'},
+ {'eid address': '10:1::1',
+ 'eid prefix len': 32,
+ 'locator-set': 'ls1'},
+ {'eid address': '10:2::1',
+ 'eid prefix len': 32,
+ 'locator-set': 'ls1'},
+ {'eid address': '10:3::1',
+ 'eid prefix len': 32,
+ 'locator-set': 'ls1'}]
+
+"""Example lisp map resolvers data we want set to VPP
+and then check if is set correct."""
+map_resolver = [{'map resolver': '192.169.0.1'},
+ {'map resolver': '192.169.1.1'},
+ {'map resolver': '192.169.2.1'},
+ {'map resolver': '12:1::1'},
+ {'map resolver': '12:2::1'}]