diff --git a/test/case/ietf_hardware/Readme.adoc b/test/case/ietf_hardware/Readme.adoc new file mode 100644 index 00000000..94e96908 --- /dev/null +++ b/test/case/ietf_hardware/Readme.adoc @@ -0,0 +1,8 @@ +:testgroup: +== ietf-hardware + +<<< + +include::usb/Readme.adoc[] + +include::usb_two_ports/Readme.adoc[] diff --git a/test/case/ietf_hardware/usb/Readme.adoc b/test/case/ietf_hardware/usb/Readme.adoc new file mode 100644 index 00000000..0247fcde --- /dev/null +++ b/test/case/ietf_hardware/usb/Readme.adoc @@ -0,0 +1,42 @@ +=== USB configuration +==== Description +This will test if the configuration is consistent with hardware state, +if the USB ports are _locked_ (forbidden for use) and _unlocked_ +(Ready for use) when they should. Also test if it is the case during +reboot. This does not the test actual use of the USB port, just check +that the configured state is consistent with the hardware state. + +If this pass you can be certeain of that the configuration of the USB +port is handled correctly. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_hardware/usb/topology.png[USB configuration topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_hardware/usb/topology.png[USB configuration topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[USB configuration topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Unlock all USB ports +. Verify that all USB ports are unlocked +. Lock all USB ports +. Verify that all USB ports are locked +. Remove all hardware configuration +. Verify that all USB ports are locked +. Unlock USB ports +. Verify that all USB ports are unlocked +. Save to startup and reboot +. Verify USB port remain unlocked after reboot + + +<<< + diff --git a/test/case/ietf_hardware/usb/topology.png b/test/case/ietf_hardware/usb/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_hardware/usb/topology.png differ diff --git a/test/case/ietf_hardware/usb_two_ports/Readme.adoc b/test/case/ietf_hardware/usb_two_ports/Readme.adoc new file mode 100644 index 00000000..150e66d0 --- /dev/null +++ b/test/case/ietf_hardware/usb_two_ports/Readme.adoc @@ -0,0 +1,30 @@ +=== USB configuration with two USB ports +==== Description +Test that the configuration is consistent +when having two USB ports. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_hardware/usb_two_ports/topology.png[USB configuration with two USB ports topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_hardware/usb_two_ports/topology.png[USB configuration with two USB ports topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[USB configuration with two USB ports topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Lock the first USB port, and unlock the second USB port +. Verify that the correct port is locked and the correct one is unlocked +. Unlock the first USB port, and lock the second USB port +. Verify that the correct port is locked and the correct one is unlocked + + +<<< + diff --git a/test/case/ietf_hardware/usb_two_ports/topology.png b/test/case/ietf_hardware/usb_two_ports/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_hardware/usb_two_ports/topology.png differ diff --git a/test/case/ietf_interfaces/Readme.adoc b/test/case/ietf_interfaces/Readme.adoc new file mode 100644 index 00000000..5243c316 --- /dev/null +++ b/test/case/ietf_interfaces/Readme.adoc @@ -0,0 +1,16 @@ +:testgroup: +== ietf-interfaces + +<<< + +include::vlan_ping/Readme.adoc[] + +include::ipv4_address/Readme.adoc[] + +include::ipv6_address/Readme.adoc[] + +include::iface_phys_address/Readme.adoc[] + +include::iface_status/Readme.adoc[] + +include::routing_basic/Readme.adoc[] diff --git a/test/case/ietf_interfaces/iface_phys_address/Readme.adoc b/test/case/ietf_interfaces/iface_phys_address/Readme.adoc new file mode 100644 index 00000000..5a279d29 --- /dev/null +++ b/test/case/ietf_interfaces/iface_phys_address/Readme.adoc @@ -0,0 +1,26 @@ +=== Custom MAC address on interface +==== Description +Test possibility to set mac address + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_interfaces/iface_phys_address/topology.png[Custom MAC address on interface topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_interfaces/iface_phys_address/topology.png[Custom MAC address on interface topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Custom MAC address on interface topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Set custom MAC address + + +<<< + diff --git a/test/case/ietf_interfaces/iface_phys_address/test.py b/test/case/ietf_interfaces/iface_phys_address/test.py index fa14b25d..98c225f3 100755 --- a/test/case/ietf_interfaces/iface_phys_address/test.py +++ b/test/case/ietf_interfaces/iface_phys_address/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Custom MAC address on interface +Test possibility to set mac address +""" import copy import infamy import infamy.iface as iface diff --git a/test/case/ietf_interfaces/iface_phys_address/topology.png b/test/case/ietf_interfaces/iface_phys_address/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/ietf_interfaces/iface_phys_address/topology.png differ diff --git a/test/case/ietf_interfaces/iface_status/Readme.adoc b/test/case/ietf_interfaces/iface_status/Readme.adoc new file mode 100644 index 00000000..f6b2176e --- /dev/null +++ b/test/case/ietf_interfaces/iface_status/Readme.adoc @@ -0,0 +1,25 @@ +=== Interface status +==== Description +Check that interface status works + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_interfaces/iface_status/topology.png[Interface status topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_interfaces/iface_status/topology.png[Interface status topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Interface status topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize + + +<<< + diff --git a/test/case/ietf_interfaces/iface_status/test.py b/test/case/ietf_interfaces/iface_status/test.py index 6a49094f..d09e747d 100755 --- a/test/case/ietf_interfaces/iface_status/test.py +++ b/test/case/ietf_interfaces/iface_status/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Interface status +Check that interface status works +""" import infamy import infamy.iface as iface import os @@ -30,21 +34,21 @@ with infamy.Test() as test: with test.step("Initialize"): env = infamy.Env() target = env.attach("target", "mgmt") - + iface.print_all(target) loopback_iface = "lo" - _, mgmt_iface = env.ltop.xlate("target", "mgmt") + _, mgmt_iface = env.ltop.xlate("target", "mgmt") ifaces_under_test = [loopback_iface, mgmt_iface] print(f"Interfaces under test: {ifaces_under_test}") - + for interface in ifaces_under_test: with test.step(f"Verifying <{interface}> interface"): asser_iface_exists(target, interface) - + with test.step(f"Verifying for <{interface}> interface"): assert_if_index(target, interface) - + with test.step(f"Verifying for <{interface}> interface"): assert_oper_status(target, interface) diff --git a/test/case/ietf_interfaces/iface_status/topology.png b/test/case/ietf_interfaces/iface_status/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_interfaces/iface_status/topology.png differ diff --git a/test/case/ietf_interfaces/ipv4_address/Readme.adoc b/test/case/ietf_interfaces/ipv4_address/Readme.adoc new file mode 100644 index 00000000..306df83f --- /dev/null +++ b/test/case/ietf_interfaces/ipv4_address/Readme.adoc @@ -0,0 +1,29 @@ +=== Interface with IPv4 +==== Description +Test that it is possible to set and remove the IPv4 address on a interface + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_interfaces/ipv4_address/topology.png[Interface with IPv4 topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_interfaces/ipv4_address/topology.png[Interface with IPv4 topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Interface with IPv4 topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Setup +. Get initial IP addresses +. Configure IP address +. Get updated IP addresses +. Get updated IP addresses + + +<<< + diff --git a/test/case/ietf_interfaces/ipv4_address/test.py b/test/case/ietf_interfaces/ipv4_address/test.py index 3926b8cc..a2729240 100755 --- a/test/case/ietf_interfaces/ipv4_address/test.py +++ b/test/case/ietf_interfaces/ipv4_address/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Interface with IPv4 +Test that it is possible to set and remove the IPv4 address on a interface +""" import copy import infamy import infamy.iface as iface diff --git a/test/case/ietf_interfaces/ipv4_address/topology.png b/test/case/ietf_interfaces/ipv4_address/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_interfaces/ipv4_address/topology.png differ diff --git a/test/case/ietf_interfaces/ipv6_address/Readme.adoc b/test/case/ietf_interfaces/ipv6_address/Readme.adoc new file mode 100644 index 00000000..7a7c2ba9 --- /dev/null +++ b/test/case/ietf_interfaces/ipv6_address/Readme.adoc @@ -0,0 +1,28 @@ +=== Interface IPv6 autoconf for bridges +==== Description +Verify IPv6 autoconf on a bridge is properly set up for global prefix. +See issue #473 for details. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_interfaces/ipv6_address/topology.png[Interface IPv6 autoconf for bridges topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_interfaces/ipv6_address/topology.png[Interface IPv6 autoconf for bridges topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Interface IPv6 autoconf for bridges topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initializing ... +. Setting up bridge with IPv6 SLAAC for global prefix ... +. Verifying sysctl autoconf setting ... + + +<<< + diff --git a/test/case/ietf_interfaces/ipv6_address/test.py b/test/case/ietf_interfaces/ipv6_address/test.py index 8c0a854c..73988cd0 100755 --- a/test/case/ietf_interfaces/ipv6_address/test.py +++ b/test/case/ietf_interfaces/ipv6_address/test.py @@ -1,7 +1,10 @@ #!/usr/bin/env python3 -# Verify IPv6 autoconf on a bridge is properly set up for global prefix. -# See issue #473 for details. +""" +Interface IPv6 autoconf for bridges +Verify IPv6 autoconf on a bridge is properly set up for global prefix. +See issue #473 for details. +""" import infamy with infamy.Test() as test: diff --git a/test/case/ietf_interfaces/ipv6_address/topology.png b/test/case/ietf_interfaces/ipv6_address/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/ietf_interfaces/ipv6_address/topology.png differ diff --git a/test/case/ietf_interfaces/routing_basic/Readme.adoc b/test/case/ietf_interfaces/routing_basic/Readme.adoc new file mode 100644 index 00000000..89c85ec6 --- /dev/null +++ b/test/case/ietf_interfaces/routing_basic/Readme.adoc @@ -0,0 +1,30 @@ +=== Routing basic +==== Description +Test that ipv4 forwarding setting in configuration is respected + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_interfaces/routing_basic/topology.png[Routing basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_interfaces/routing_basic/topology.png[Routing basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Routing basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Setup host +. Enable forwarding +. Traffic is forwarded +. Disable forwarding +. Traffic is not forwarded + + +<<< + diff --git a/test/case/ietf_interfaces/routing_basic/test.py b/test/case/ietf_interfaces/routing_basic/test.py index 39bc737d..47da08a7 100755 --- a/test/case/ietf_interfaces/routing_basic/test.py +++ b/test/case/ietf_interfaces/routing_basic/test.py @@ -16,6 +16,11 @@ # | [ HOST ] | # '----------------------------------------------' +""" +Routing basic + +Test that ipv4 forwarding setting in configuration is respected +""" import infamy def config_target(target, tport0, tport1, enable_fwd): diff --git a/test/case/ietf_interfaces/routing_basic/topology.png b/test/case/ietf_interfaces/routing_basic/topology.png new file mode 100644 index 00000000..fb612860 Binary files /dev/null and b/test/case/ietf_interfaces/routing_basic/topology.png differ diff --git a/test/case/ietf_interfaces/vlan_ping/Readme.adoc b/test/case/ietf_interfaces/vlan_ping/Readme.adoc new file mode 100644 index 00000000..0c535286 --- /dev/null +++ b/test/case/ietf_interfaces/vlan_ping/Readme.adoc @@ -0,0 +1,29 @@ +=== VLAN ping connectivity +==== Description +Very basic test if the VLAN configuration works. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_interfaces/vlan_ping/topology.png[VLAN ping connectivity topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_interfaces/vlan_ping/topology.png[VLAN ping connectivity topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[VLAN ping connectivity topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure VLAN 10 on target:data with IP 10.0.0.2 +. Waiting for links to come up +. Ping 10.0.0.2 from VLAN 10 on host:data with IP 10.0.0.1 +. Remove VLAN interface, and test again (should not be able to ping) + + +<<< + diff --git a/test/case/ietf_interfaces/vlan_ping/test.py b/test/case/ietf_interfaces/vlan_ping/test.py index ff616d43..d4a9897b 100755 --- a/test/case/ietf_interfaces/vlan_ping/test.py +++ b/test/case/ietf_interfaces/vlan_ping/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +VLAN ping connectivity +Very basic test if the VLAN configuration works. +""" import infamy import infamy.iface as iface import copy diff --git a/test/case/ietf_interfaces/vlan_ping/topology.png b/test/case/ietf_interfaces/vlan_ping/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/ietf_interfaces/vlan_ping/topology.png differ diff --git a/test/case/ietf_routing/Readme.adoc b/test/case/ietf_routing/Readme.adoc new file mode 100644 index 00000000..539fcdaf --- /dev/null +++ b/test/case/ietf_routing/Readme.adoc @@ -0,0 +1,13 @@ +:testgroup: + +== ietf-routing + +<<< + +include::static_routing/Readme.adoc[] + +include::ospf_basic/Readme.adoc[] + +include::ospf_unnumbered_interface/Readme.adoc[] + +include::ospf_multiarea/Readme.adoc[] diff --git a/test/case/ietf_routing/ospf_basic/Readme.adoc b/test/case/ietf_routing/ospf_basic/Readme.adoc new file mode 100644 index 00000000..946cba79 --- /dev/null +++ b/test/case/ietf_routing/ospf_basic/Readme.adoc @@ -0,0 +1,29 @@ +=== OSPF Basic +==== Description +Very basic OSPF test just test that OSPF sends HELLO packets between the DUTs +and that they exchange routes, ending with a simple connectivity check. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_routing/ospf_basic/topology.png[OSPF Basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_routing/ospf_basic/topology.png[OSPF Basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[OSPF Basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure targets +. Wait for OSPF routes +. Test connectivity + + +<<< + diff --git a/test/case/ietf_routing/ospf_basic/test.py b/test/case/ietf_routing/ospf_basic/test.py index 37bd519b..a409e6ea 100755 --- a/test/case/ietf_routing/ospf_basic/test.py +++ b/test/case/ietf_routing/ospf_basic/test.py @@ -1,6 +1,12 @@ #!/usr/bin/env python3 -import infamy +""" +OSPF Basic +Very basic OSPF test just test that OSPF sends HELLO packets between the DUTs +and that they exchange routes, ending with a simple connectivity check. +""" + +import infamy import infamy.route as route from infamy.util import until, parallel diff --git a/test/case/ietf_routing/ospf_basic/topology.png b/test/case/ietf_routing/ospf_basic/topology.png new file mode 100644 index 00000000..483114ef Binary files /dev/null and b/test/case/ietf_routing/ospf_basic/topology.png differ diff --git a/test/case/ietf_routing/ospf_multiarea/Readme.adoc b/test/case/ietf_routing/ospf_multiarea/Readme.adoc new file mode 100644 index 00000000..6e8f4602 --- /dev/null +++ b/test/case/ietf_routing/ospf_multiarea/Readme.adoc @@ -0,0 +1,34 @@ +=== OSPF with multiple areas +==== Description +This test test alot of features inside OSPF using 3 areas (one NSSA area) +to test the distribution of routes is deterministic (using cost), also test +link breaks using BFD (not implemented in infamy though) + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_routing/ospf_multiarea/topology.png[OSPF with multiple areas topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_routing/ospf_multiarea/topology.png[OSPF with multiple areas topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[OSPF with multiple areas topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure targets +. Wait for neighbors +. Wait for routes from OSPF +. Verify NSSA area +. Testing connectivitiy through NSSA area +. Verify correct hops +. Disable link between R1 and R4, and verify correct hops + + +<<< + diff --git a/test/case/ietf_routing/ospf_multiarea/test.py b/test/case/ietf_routing/ospf_multiarea/test.py index b79ea319..a5bb41c8 100755 --- a/test/case/ietf_routing/ospf_multiarea/test.py +++ b/test/case/ietf_routing/ospf_multiarea/test.py @@ -25,6 +25,13 @@ # +-------+ # # +""" +OSPF with multiple areas + +This test test alot of features inside OSPF using 3 areas (one NSSA area) +to test the distribution of routes is deterministic (using cost), also test +link breaks using BFD (not implemented in infamy though) +""" import infamy import infamy.route as route diff --git a/test/case/ietf_routing/ospf_multiarea/topology.png b/test/case/ietf_routing/ospf_multiarea/topology.png new file mode 100644 index 00000000..4dfde070 Binary files /dev/null and b/test/case/ietf_routing/ospf_multiarea/topology.png differ diff --git a/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc b/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc new file mode 100644 index 00000000..3d52c8fc --- /dev/null +++ b/test/case/ietf_routing/ospf_unnumbered_interface/Readme.adoc @@ -0,0 +1,35 @@ +=== OSPF unnumbered interfaces +==== Description +This test that a configuration expecting unnumbered interfaces +get that also in OSPF. Also verify that passive interface in +the configuration gets activated in OSPF. + +When this test pass, you can expect unnumbered interfaces, interface type +configuration and passive to function + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_routing/ospf_unnumbered_interface/topology.png[OSPF unnumbered interfaces topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_routing/ospf_unnumbered_interface/topology.png[OSPF unnumbered interfaces topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[OSPF unnumbered interfaces topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure targets +. Wait for OSPF routes +. Check interface type +. Test passive interface +. Test connectivity + + +<<< + diff --git a/test/case/ietf_routing/ospf_unnumbered_interface/test.py b/test/case/ietf_routing/ospf_unnumbered_interface/test.py index f752b59a..efadc6bb 100755 --- a/test/case/ietf_routing/ospf_unnumbered_interface/test.py +++ b/test/case/ietf_routing/ospf_unnumbered_interface/test.py @@ -1,10 +1,20 @@ #!/usr/bin/env python3 +""" +OSPF unnumbered interfaces + +This test that a configuration expecting unnumbered interfaces +get that also in OSPF. Also verify that passive interface in +the configuration gets activated in OSPF. + +When this test pass, you can expect unnumbered interfaces, interface type +configuration and passive to function +""" + import infamy import time import infamy.route as route from infamy.util import until, parallel - # This test tests passive interfaces and unnumbered interfaces. def config_target1(target, data, link): diff --git a/test/case/ietf_routing/ospf_unnumbered_interface/topology.png b/test/case/ietf_routing/ospf_unnumbered_interface/topology.png new file mode 100644 index 00000000..483114ef Binary files /dev/null and b/test/case/ietf_routing/ospf_unnumbered_interface/topology.png differ diff --git a/test/case/ietf_routing/static_routing/Readme.adoc b/test/case/ietf_routing/static_routing/Readme.adoc new file mode 100644 index 00000000..bb1457f5 --- /dev/null +++ b/test/case/ietf_routing/static_routing/Readme.adoc @@ -0,0 +1,33 @@ +=== Static routing +==== Description +Test that it is possible to use static routes (IPv4 and IPv6) +works as expected + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_routing/static_routing/topology.png[Static routing topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_routing/static_routing/topology.png[Static routing topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Static routing topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure targets +. Wait for routes +. Configure host addresses and routes +. Verify that dut2 is reachable from host over IPv4 +. Verify that dut2 is reachable from host over IPv6 +. Remove static routes on dut1 +. Verify that dut2 is no longer reachable + + +<<< + diff --git a/test/case/ietf_routing/static_routing/test.py b/test/case/ietf_routing/static_routing/test.py index 7db5ee73..4d56303c 100755 --- a/test/case/ietf_routing/static_routing/test.py +++ b/test/case/ietf_routing/static_routing/test.py @@ -15,7 +15,12 @@ # | | # | | # +-------------------------------------------+ +""" +Static routing +Test that it is possible to use static routes (IPv4 and IPv6) +works as expected +""" import copy import infamy import time diff --git a/test/case/ietf_routing/static_routing/topology.png b/test/case/ietf_routing/static_routing/topology.png new file mode 100644 index 00000000..483114ef Binary files /dev/null and b/test/case/ietf_routing/static_routing/topology.png differ diff --git a/test/case/ietf_syslog/Readme.adoc b/test/case/ietf_syslog/Readme.adoc new file mode 100644 index 00000000..03d35e42 --- /dev/null +++ b/test/case/ietf_syslog/Readme.adoc @@ -0,0 +1,8 @@ +:testgroup: +== ietf-syslog + +<<< + +include::basic/Readme.adoc[] + +include::remote/Readme.adoc[] diff --git a/test/case/ietf_syslog/basic/Readme.adoc b/test/case/ietf_syslog/basic/Readme.adoc new file mode 100644 index 00000000..bd435901 --- /dev/null +++ b/test/case/ietf_syslog/basic/Readme.adoc @@ -0,0 +1,28 @@ +=== Syslog Basic +==== Description +- Add syslog actions to log to local files +- Verify new log files have been created + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_syslog/basic/topology.png[Syslog Basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_syslog/basic/topology.png[Syslog Basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Syslog Basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initializing ... +. Add new syslog file action +. Verify log files have been created ... + + +<<< + diff --git a/test/case/ietf_syslog/basic/test.py b/test/case/ietf_syslog/basic/test.py index a7693df0..189a22bc 100755 --- a/test/case/ietf_syslog/basic/test.py +++ b/test/case/ietf_syslog/basic/test.py @@ -1,7 +1,9 @@ #!/usr/bin/env python3 """ - - Add syslog actions to log to local files - - Verify new log files have been created +Syslog Basic + +- Add syslog actions to log to local files +- Verify new log files have been created """ import infamy diff --git a/test/case/ietf_syslog/basic/topology.png b/test/case/ietf_syslog/basic/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_syslog/basic/topology.png differ diff --git a/test/case/ietf_syslog/remote/Readme.adoc b/test/case/ietf_syslog/remote/Readme.adoc new file mode 100644 index 00000000..53ac2c15 --- /dev/null +++ b/test/case/ietf_syslog/remote/Readme.adoc @@ -0,0 +1,28 @@ +=== Remote syslog +==== Description +Verify logging to remote, acting as a remote, and RFC5424 log format. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_syslog/remote/topology.png[Remote syslog topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_syslog/remote/topology.png[Remote syslog topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Remote syslog topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Topology setup +. Syslog setup +. Verify logging from client to server + + +<<< + diff --git a/test/case/ietf_syslog/remote/test.py b/test/case/ietf_syslog/remote/test.py index 5670b22b..ee57c220 100755 --- a/test/case/ietf_syslog/remote/test.py +++ b/test/case/ietf_syslog/remote/test.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 """ +Remote syslog + Verify logging to remote, acting as a remote, and RFC5424 log format. """ import infamy diff --git a/test/case/ietf_syslog/remote/topology.png b/test/case/ietf_syslog/remote/topology.png new file mode 100644 index 00000000..483114ef Binary files /dev/null and b/test/case/ietf_syslog/remote/topology.png differ diff --git a/test/case/ietf_system/Readme.adoc b/test/case/ietf_system/Readme.adoc new file mode 100644 index 00000000..5a36374e --- /dev/null +++ b/test/case/ietf_system/Readme.adoc @@ -0,0 +1,14 @@ +:testgroup: +== ietf-system + +<<< + +include::hostname/Readme.adoc[] + +include::add_delete_user/Readme.adoc[] + +include::user_admin/Readme.adoc[] + +include::timezone/Readme.adoc[] + +include::timezone_utc_offset/Readme.adoc[] diff --git a/test/case/ietf_system/add_delete_user/Readme.adoc b/test/case/ietf_system/add_delete_user/Readme.adoc new file mode 100644 index 00000000..5e684939 --- /dev/null +++ b/test/case/ietf_system/add_delete_user/Readme.adoc @@ -0,0 +1,26 @@ +=== Add/delete user +==== Description +Verify that it is possible to add a user, and then remove it + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_system/add_delete_user/topology.png[Add/delete user topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_system/add_delete_user/topology.png[Add/delete user topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Add/delete user topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Add new user + + +<<< + diff --git a/test/case/ietf_system/add_delete_user/test.py b/test/case/ietf_system/add_delete_user/test.py index 510bcbe4..23e76202 100755 --- a/test/case/ietf_system/add_delete_user/test.py +++ b/test/case/ietf_system/add_delete_user/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Add/delete user +Verify that it is possible to add a user, and then remove it +""" import infamy import copy from passlib.hash import sha256_crypt diff --git a/test/case/ietf_system/add_delete_user/topology.png b/test/case/ietf_system/add_delete_user/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_system/add_delete_user/topology.png differ diff --git a/test/case/ietf_system/hostname/Readme.adoc b/test/case/ietf_system/hostname/Readme.adoc new file mode 100644 index 00000000..a94c383e --- /dev/null +++ b/test/case/ietf_system/hostname/Readme.adoc @@ -0,0 +1,26 @@ +=== Set hostname +==== Description +Verify that it is possible to change hostname + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_system/hostname/topology.png[Set hostname topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_system/hostname/topology.png[Set hostname topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Set hostname topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Set new hostname + + +<<< + diff --git a/test/case/ietf_system/hostname/test.py b/test/case/ietf_system/hostname/test.py index e6f38190..07b88fe7 100755 --- a/test/case/ietf_system/hostname/test.py +++ b/test/case/ietf_system/hostname/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Set hostname +Verify that it is possible to change hostname +""" import random import string import re diff --git a/test/case/ietf_system/hostname/topology.png b/test/case/ietf_system/hostname/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_system/hostname/topology.png differ diff --git a/test/case/ietf_system/timezone/Readme.adoc b/test/case/ietf_system/timezone/Readme.adoc new file mode 100644 index 00000000..1c82e124 --- /dev/null +++ b/test/case/ietf_system/timezone/Readme.adoc @@ -0,0 +1,27 @@ +=== Set timezone +==== Description +Verify that it is possible to set timezone + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_system/timezone/topology.png[Set timezone topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_system/timezone/topology.png[Set timezone topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Set timezone topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Set timezone +. Verify current time. + + +<<< + diff --git a/test/case/ietf_system/timezone/test.py b/test/case/ietf_system/timezone/test.py index daa324fb..f6d5eb05 100755 --- a/test/case/ietf_system/timezone/test.py +++ b/test/case/ietf_system/timezone/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Set timezone +Verify that it is possible to set timezone +""" import random, string import time import infamy diff --git a/test/case/ietf_system/timezone/topology.png b/test/case/ietf_system/timezone/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_system/timezone/topology.png differ diff --git a/test/case/ietf_system/timezone_utc_offset/Readme.adoc b/test/case/ietf_system/timezone_utc_offset/Readme.adoc new file mode 100644 index 00000000..40c60424 --- /dev/null +++ b/test/case/ietf_system/timezone_utc_offset/Readme.adoc @@ -0,0 +1,27 @@ +=== Set timezone with UTC offset +==== Description +Verify that it is possible to set timezone using UTC offset + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_system/timezone_utc_offset/topology.png[Set timezone with UTC offset topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_system/timezone_utc_offset/topology.png[Set timezone with UTC offset topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Set timezone with UTC offset topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Set timezone UTC offset +. Verify current time. + + +<<< + diff --git a/test/case/ietf_system/timezone_utc_offset/test.py b/test/case/ietf_system/timezone_utc_offset/test.py index 8f2b1820..2b39392b 100755 --- a/test/case/ietf_system/timezone_utc_offset/test.py +++ b/test/case/ietf_system/timezone_utc_offset/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Set timezone with UTC offset +Verify that it is possible to set timezone using UTC offset +""" import infamy import lxml diff --git a/test/case/ietf_system/timezone_utc_offset/topology.png b/test/case/ietf_system/timezone_utc_offset/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_system/timezone_utc_offset/topology.png differ diff --git a/test/case/ietf_system/upgrade/Readme.adoc b/test/case/ietf_system/upgrade/Readme.adoc new file mode 100644 index 00000000..355a1f5e --- /dev/null +++ b/test/case/ietf_system/upgrade/Readme.adoc @@ -0,0 +1,26 @@ +=== Upgrade +==== Description +Verify it is possible to upgrade + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_system/upgrade/topology.png[Upgrade topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_system/upgrade/topology.png[Upgrade topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Upgrade topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Wait for upgrade to finish + + +<<< + diff --git a/test/case/ietf_system/upgrade/test.py b/test/case/ietf_system/upgrade/test.py index ec609985..391496df 100755 --- a/test/case/ietf_system/upgrade/test.py +++ b/test/case/ietf_system/upgrade/test.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +""" +Upgrade +Verify it is possible to upgrade +""" import concurrent.futures import functools import http.server diff --git a/test/case/ietf_system/upgrade/topology.png b/test/case/ietf_system/upgrade/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_system/upgrade/topology.png differ diff --git a/test/case/ietf_system/user_admin/Readme.adoc b/test/case/ietf_system/user_admin/Readme.adoc new file mode 100644 index 00000000..0d8ab980 --- /dev/null +++ b/test/case/ietf_system/user_admin/Readme.adoc @@ -0,0 +1,29 @@ +=== Add admin user +==== Description +- Add a non-admin user and verify they have no privs +- Add user to admin group and recheck privileges +- Test admin user, verify $factory$ password in running + and active password in operational datastore + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/ietf_system/user_admin/topology.png[Add admin user topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/ietf_system/user_admin/topology.png[Add admin user topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Add admin user topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initializing ... +. Add new user + + +<<< + diff --git a/test/case/ietf_system/user_admin/test.py b/test/case/ietf_system/user_admin/test.py index 19fcf99d..c1ea61ba 100755 --- a/test/case/ietf_system/user_admin/test.py +++ b/test/case/ietf_system/user_admin/test.py @@ -1,8 +1,10 @@ #!/usr/bin/env python3 """ - - Add a non-admin user and verify they have no privs - - Add user to admin group and recheck privileges - - Test admin user, verify $factory$ password in running +Add admin user + +- Add a non-admin user and verify they have no privs +- Add user to admin group and recheck privileges +- Test admin user, verify $factory$ password in running and active password in operational datastore """ diff --git a/test/case/ietf_system/user_admin/topology.png b/test/case/ietf_system/user_admin/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/ietf_system/user_admin/topology.png differ diff --git a/test/case/infix_containers/Readme.adoc b/test/case/infix_containers/Readme.adoc new file mode 100644 index 00000000..4eb951db --- /dev/null +++ b/test/case/infix_containers/Readme.adoc @@ -0,0 +1,12 @@ +:testgroup: +== infix-containers + +<<< + +include::container_basic/Readme.adoc[] + +include::container_bridge/Readme.adoc[] + +include::container_phys/Readme.adoc[] + +include::container_veth/Readme.adoc[] diff --git a/test/case/infix_containers/container_basic/Readme.adoc b/test/case/infix_containers/container_basic/Readme.adoc new file mode 100644 index 00000000..7b9ad2b7 --- /dev/null +++ b/test/case/infix_containers/container_basic/Readme.adoc @@ -0,0 +1,29 @@ +=== Container basic +==== Description +Verify that a simple web server container can be configured to run +with host networking, on port 80. Operation is verified using a +simple GET request for index.html and checking for a key phrase. + +The RPC actions: stop + start, and restart are also verified. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_containers/container_basic/topology.png[Container basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_containers/container_basic/topology.png[Container basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Container basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Set up topology and attach to target DUT + + +<<< + diff --git a/test/case/infix_containers/container_basic/test.py b/test/case/infix_containers/container_basic/test.py index f72b40d7..0dab2cd3 100755 --- a/test/case/infix_containers/container_basic/test.py +++ b/test/case/infix_containers/container_basic/test.py @@ -6,7 +6,15 @@ # # The RPC actions: stop + start, and restart are also verified. # +""" +Container basic +Verify that a simple web server container can be configured to run +with host networking, on port 80. Operation is verified using a +simple GET request for index.html and checking for a key phrase. + +The RPC actions: stop + start, and restart are also verified. +""" import infamy from infamy.util import until diff --git a/test/case/infix_containers/container_basic/topology.png b/test/case/infix_containers/container_basic/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_containers/container_basic/topology.png differ diff --git a/test/case/infix_containers/container_bridge/Readme.adoc b/test/case/infix_containers/container_bridge/Readme.adoc new file mode 100644 index 00000000..61ecec30 --- /dev/null +++ b/test/case/infix_containers/container_bridge/Readme.adoc @@ -0,0 +1,27 @@ +=== Container with bridge network +==== Description +Verify connectivity with a simple web server container from behind a +docker0 bridge. As an added twist, this test also verifies content +mounts, i.e., custom index.html from running-config. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_containers/container_bridge/topology.png[Container with bridge network topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_containers/container_bridge/topology.png[Container with bridge network topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Container with bridge network topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize + + +<<< + diff --git a/test/case/infix_containers/container_bridge/test.py b/test/case/infix_containers/container_bridge/test.py index 7fd1387f..ac26c51d 100755 --- a/test/case/infix_containers/container_bridge/test.py +++ b/test/case/infix_containers/container_bridge/test.py @@ -4,7 +4,13 @@ # docker0 bridge. As an added twist, this test also verifies content # mounts, i.e., custom index.html from running-config. # +""" +Container with bridge network +Verify connectivity with a simple web server container from behind a +docker0 bridge. As an added twist, this test also verifies content +mounts, i.e., custom index.html from running-config. +""" import base64 import infamy from infamy.util import until diff --git a/test/case/infix_containers/container_bridge/topology.png b/test/case/infix_containers/container_bridge/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_containers/container_bridge/topology.png differ diff --git a/test/case/infix_containers/container_phys/Readme.adoc b/test/case/infix_containers/container_phys/Readme.adoc new file mode 100644 index 00000000..1e76b512 --- /dev/null +++ b/test/case/infix_containers/container_phys/Readme.adoc @@ -0,0 +1,26 @@ +=== Container with physical interface +==== Description +Verify connectivity with a simple web server container that's been +given a physical interface instead of an end of a VETH pair. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_containers/container_phys/topology.png[Container with physical interface topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_containers/container_phys/topology.png[Container with physical interface topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Container with physical interface topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize + + +<<< + diff --git a/test/case/infix_containers/container_phys/test.py b/test/case/infix_containers/container_phys/test.py index cf7caa40..d8c6d42a 100755 --- a/test/case/infix_containers/container_phys/test.py +++ b/test/case/infix_containers/container_phys/test.py @@ -3,7 +3,12 @@ # Verify connectivity with a simple web server container that's been # given a physical interface instead of an end of a VETH pair. # +""" +Container with physical interface +Verify connectivity with a simple web server container that's been +given a physical interface instead of an end of a VETH pair. +""" import base64 import infamy from infamy.util import until diff --git a/test/case/infix_containers/container_phys/topology.png b/test/case/infix_containers/container_phys/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_containers/container_phys/topology.png differ diff --git a/test/case/infix_containers/container_veth/Readme.adoc b/test/case/infix_containers/container_veth/Readme.adoc new file mode 100644 index 00000000..dbd3062e --- /dev/null +++ b/test/case/infix_containers/container_veth/Readme.adoc @@ -0,0 +1,26 @@ +=== Container with VETH pair +==== Description +Verify connectivity with a simple web server container from behind a +regular bridge, a VETH pair connects the container to the bridge. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_containers/container_veth/topology.png[Container with VETH pair topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_containers/container_veth/topology.png[Container with VETH pair topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Container with VETH pair topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize + + +<<< + diff --git a/test/case/infix_containers/container_veth/test.py b/test/case/infix_containers/container_veth/test.py index 9148a7cd..323d6371 100755 --- a/test/case/infix_containers/container_veth/test.py +++ b/test/case/infix_containers/container_veth/test.py @@ -3,7 +3,12 @@ # Verify connectivity with a simple web server container from behind a # regular bridge, a VETH pair connects the container to the bridge. # +""" +Container with VETH pair +Verify connectivity with a simple web server container from behind a +regular bridge, a VETH pair connects the container to the bridge. +""" import base64 import infamy from infamy.util import until diff --git a/test/case/infix_containers/container_veth/topology.png b/test/case/infix_containers/container_veth/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_containers/container_veth/topology.png differ diff --git a/test/case/infix_dhcp/Readme.adoc b/test/case/infix_dhcp/Readme.adoc new file mode 100644 index 00000000..f0fa0656 --- /dev/null +++ b/test/case/infix_dhcp/Readme.adoc @@ -0,0 +1,10 @@ +:testgroup: +== infix-dhcp + +<<< + +include::dhcp_basic/Readme.adoc[] + +include::dhcp_router/Readme.adoc[] + +include::dhcp_routes/Readme.adoc[] diff --git a/test/case/infix_dhcp/dhcp_basic/Readme.adoc b/test/case/infix_dhcp/dhcp_basic/Readme.adoc new file mode 100644 index 00000000..17f491cc --- /dev/null +++ b/test/case/infix_dhcp/dhcp_basic/Readme.adoc @@ -0,0 +1,27 @@ +=== DHCP Basic +==== Description +This is a very basic DHCP test that requests an IPv4 lease +from a DHCP server and checks that the lease is set on the + interface. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_dhcp/dhcp_basic/topology.png[DHCP Basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_dhcp/dhcp_basic/topology.png[DHCP Basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[DHCP Basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize + + +<<< + diff --git a/test/case/infix_dhcp/dhcp_basic/test.py b/test/case/infix_dhcp/dhcp_basic/test.py index 3ee6de98..bd7d0328 100755 --- a/test/case/infix_dhcp/dhcp_basic/test.py +++ b/test/case/infix_dhcp/dhcp_basic/test.py @@ -2,7 +2,13 @@ # This is a very basic DHCP test that requests an IPv4 lease # from a DHCP server and checks that the lease is set on the # interface. +""" +DHCP Basic +This is a very basic DHCP test that requests an IPv4 lease +from a DHCP server and checks that the lease is set on the + interface. +""" import time import infamy, infamy.dhcp import infamy.iface as iface diff --git a/test/case/infix_dhcp/dhcp_basic/topology.png b/test/case/infix_dhcp/dhcp_basic/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_dhcp/dhcp_basic/topology.png differ diff --git a/test/case/infix_dhcp/dhcp_router/Readme.adoc b/test/case/infix_dhcp/dhcp_router/Readme.adoc new file mode 100644 index 00000000..c0ada24b --- /dev/null +++ b/test/case/infix_dhcp/dhcp_router/Readme.adoc @@ -0,0 +1,26 @@ +=== DHCP router +==== Description +Verify that the DHCP client receives default gatewa (DHCP option 3, router) +and that exist in operational datastore + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_dhcp/dhcp_router/topology.png[DHCP router topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_dhcp/dhcp_router/topology.png[DHCP router topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[DHCP router topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize + + +<<< + diff --git a/test/case/infix_dhcp/dhcp_router/test.py b/test/case/infix_dhcp/dhcp_router/test.py index 142a66a3..5fc9f381 100755 --- a/test/case/infix_dhcp/dhcp_router/test.py +++ b/test/case/infix_dhcp/dhcp_router/test.py @@ -1,6 +1,11 @@ #!/usr/bin/env python3 # Verify DHCP option 3 (router) +""" +DHCP router +Verify that the DHCP client receives default gatewa (DHCP option 3, router) +and that exist in operational datastore +""" import time import infamy, infamy.dhcp import infamy.iface as iface diff --git a/test/case/infix_dhcp/dhcp_router/topology.png b/test/case/infix_dhcp/dhcp_router/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_dhcp/dhcp_router/topology.png differ diff --git a/test/case/infix_dhcp/dhcp_routes/Readme.adoc b/test/case/infix_dhcp/dhcp_routes/Readme.adoc new file mode 100644 index 00000000..d74f9098 --- /dev/null +++ b/test/case/infix_dhcp/dhcp_routes/Readme.adoc @@ -0,0 +1,26 @@ +=== DHCP router +==== Description +Verify DHCP option 121 (staticroutes) is used over option 3 and that the routes exist in +the operational datastore + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_dhcp/dhcp_routes/topology.png[DHCP router topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_dhcp/dhcp_routes/topology.png[DHCP router topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[DHCP router topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize + + +<<< + diff --git a/test/case/infix_dhcp/dhcp_routes/test.py b/test/case/infix_dhcp/dhcp_routes/test.py index d8350e99..864f3a16 100755 --- a/test/case/infix_dhcp/dhcp_routes/test.py +++ b/test/case/infix_dhcp/dhcp_routes/test.py @@ -1,6 +1,11 @@ #!/usr/bin/env python3 # Verify DHCP option 121 (staticroutes) is used over option 3 +""" +DHCP router +Verify DHCP option 121 (staticroutes) is used over option 3 and that the routes exist in +the operational datastore +""" import time import infamy, infamy.dhcp import infamy.iface as iface diff --git a/test/case/infix_dhcp/dhcp_routes/topology.png b/test/case/infix_dhcp/dhcp_routes/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_dhcp/dhcp_routes/topology.png differ diff --git a/test/case/infix_interfaces/Readme.adoc b/test/case/infix_interfaces/Readme.adoc new file mode 100644 index 00000000..c56620fc --- /dev/null +++ b/test/case/infix_interfaces/Readme.adoc @@ -0,0 +1,26 @@ +:testgroup: +== Infix-interfaces - merge with ietf-interfaces + +<<< + +include::bridge_basic/Readme.adoc[] + +include::bridge_veth/Readme.adoc[] + +include::dual_bridge/Readme.adoc[] + +include::bridge_vlan/Readme.adoc[] + +include::ipv4_autoconf/Readme.adoc[] + +include::bridge_fwd_dual_dut/Readme.adoc[] + +include::bridge_vlan_separation/Readme.adoc[] + +include::igmp_basic/Readme.adoc[] + +include::igmp_vlan/Readme.adoc[] + +include::static_multicast_filters/Readme.adoc[] + +include::vlan_qos/Readme.adoc[] diff --git a/test/case/infix_interfaces/bridge_basic/Readme.adoc b/test/case/infix_interfaces/bridge_basic/Readme.adoc new file mode 100644 index 00000000..1e765e0c --- /dev/null +++ b/test/case/infix_interfaces/bridge_basic/Readme.adoc @@ -0,0 +1,27 @@ +=== Bridge basic +==== Description +Test basic connectivity to a bridge + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_basic/topology.png[Bridge basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_basic/topology.png[Bridge basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Bridge basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure single bridge with a single physical port, bridge @ IP 10.0.0.2 +. Ping bridge 10.0.0.2 from host:data with IP 10.0.0.1 + + +<<< + diff --git a/test/case/infix_interfaces/bridge_basic/test.py b/test/case/infix_interfaces/bridge_basic/test.py index 98bc34e7..ef353a6a 100755 --- a/test/case/infix_interfaces/bridge_basic/test.py +++ b/test/case/infix_interfaces/bridge_basic/test.py @@ -4,7 +4,11 @@ # / # PC ---- e0 # +""" +Bridge basic +Test basic connectivity to a bridge +""" import infamy with infamy.Test() as test: diff --git a/test/case/infix_interfaces/bridge_basic/topology.png b/test/case/infix_interfaces/bridge_basic/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_interfaces/bridge_basic/topology.png differ diff --git a/test/case/infix_interfaces/bridge_fwd_dual_dut/Readme.adoc b/test/case/infix_interfaces/bridge_fwd_dual_dut/Readme.adoc new file mode 100644 index 00000000..c76b4b65 --- /dev/null +++ b/test/case/infix_interfaces/bridge_fwd_dual_dut/Readme.adoc @@ -0,0 +1,27 @@ +=== Bridge forwarding dual DUTs +==== Description +Ping through both DUTs using bridged ports. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.png[Bridge forwarding dual DUTs topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.png[Bridge forwarding dual DUTs topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Bridge forwarding dual DUTs topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure a bridge with triple physical port +. Ping host:data20 [10.0.0.3] and host:data21 [10.0.0.4]from host:data11 [10.0.0.2] + + +<<< + diff --git a/test/case/infix_interfaces/bridge_fwd_dual_dut/test.py b/test/case/infix_interfaces/bridge_fwd_dual_dut/test.py index c02d7efc..ec1f16b8 100755 --- a/test/case/infix_interfaces/bridge_fwd_dual_dut/test.py +++ b/test/case/infix_interfaces/bridge_fwd_dual_dut/test.py @@ -14,7 +14,11 @@ # | | # | [ HOST ] | # '-----------------------------------------------------------------------------------------' +""" +Bridge forwarding dual DUTs +Ping through both DUTs using bridged ports. +""" import infamy with infamy.Test() as test: diff --git a/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.png b/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.png new file mode 100644 index 00000000..76a67037 Binary files /dev/null and b/test/case/infix_interfaces/bridge_fwd_dual_dut/topology.png differ diff --git a/test/case/infix_interfaces/bridge_fwd_sgl_dut/Readme.adoc b/test/case/infix_interfaces/bridge_fwd_sgl_dut/Readme.adoc new file mode 100644 index 00000000..df628f6c --- /dev/null +++ b/test/case/infix_interfaces/bridge_fwd_sgl_dut/Readme.adoc @@ -0,0 +1,27 @@ +=== Bridge forwarding single DUTs +==== Description +Tests forwarding through a DUT with two bridged interfaces + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.png[Bridge forwarding single DUTs topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.png[Bridge forwarding single DUTs topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Bridge forwarding single DUTs topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure a bridge with dual physical port +. Ping host:data1 [10.0.0.2] from host:data0 [10.0.0.1] + + +<<< + diff --git a/test/case/infix_interfaces/bridge_fwd_sgl_dut/test.py b/test/case/infix_interfaces/bridge_fwd_sgl_dut/test.py index 5d0699fb..c6c03a9a 100755 --- a/test/case/infix_interfaces/bridge_fwd_sgl_dut/test.py +++ b/test/case/infix_interfaces/bridge_fwd_sgl_dut/test.py @@ -1,12 +1,12 @@ #!/usr/bin/env python3 -# ,-----------------------------------------, -# | | -# | br0 | -# | / \ | -# | target:mgmt tgt:data0 tgt:data1 | +# ,-----------------------------------------, +# | | +# | br0 | +# | / \ | +# | target:mgmt tgt:data0 tgt:data1 | # '-----------------------------------------' -# | | | -# | | | +# | | | +# | | | # ,------------------------------------------, # | host:mgmt host:data0 host:data1 | # | [10.0.0.1] [10.0.0.2] | @@ -14,7 +14,11 @@ # | | # | [ HOST ] | # '------------------------------------------' +""" +Bridge forwarding single DUTs +Tests forwarding through a DUT with two bridged interfaces +""" import infamy with infamy.Test() as test: @@ -58,10 +62,10 @@ with infamy.Test() as test: with infamy.IsolatedMacVlan(hport0) as ns0, \ infamy.IsolatedMacVlan(hport1) as ns1 : - + ns1.addip("10.0.0.2") ns0.addip("10.0.0.1") - ns0.must_reach("10.0.0.2") - + ns0.must_reach("10.0.0.2") + test.succeed() diff --git a/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.png b/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.png new file mode 100644 index 00000000..fb612860 Binary files /dev/null and b/test/case/infix_interfaces/bridge_fwd_sgl_dut/topology.png differ diff --git a/test/case/infix_interfaces/bridge_veth/Readme.adoc b/test/case/infix_interfaces/bridge_veth/Readme.adoc new file mode 100644 index 00000000..db99ee85 --- /dev/null +++ b/test/case/infix_interfaces/bridge_veth/Readme.adoc @@ -0,0 +1,28 @@ +=== Bridge with a physical port and a veth +==== Description +This tests the possibility to add software added ports, in this case +veth and bridge it with a physical port + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_veth/topology.png[Bridge with a physical port and a veth topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_veth/topology.png[Bridge with a physical port and a veth topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Bridge with a physical port and a veth topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure bridged eth port and veth pair with IP 10.0.0.2 +. Ping other end of bridged veth pair on 10.0.0.2 from host:data with IP 10.0.0.1 + + +<<< + diff --git a/test/case/infix_interfaces/bridge_veth/test.py b/test/case/infix_interfaces/bridge_veth/test.py index c1dad740..28f8aac7 100755 --- a/test/case/infix_interfaces/bridge_veth/test.py +++ b/test/case/infix_interfaces/bridge_veth/test.py @@ -4,7 +4,12 @@ # / \ # PC ---- e0 veth 10.0.0.2 # +""" +Bridge with a physical port and a veth +This tests the possibility to add software added ports, in this case +veth and bridge it with a physical port +""" import infamy with infamy.Test() as test: diff --git a/test/case/infix_interfaces/bridge_veth/topology.png b/test/case/infix_interfaces/bridge_veth/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_interfaces/bridge_veth/topology.png differ diff --git a/test/case/infix_interfaces/bridge_vlan/Readme.adoc b/test/case/infix_interfaces/bridge_vlan/Readme.adoc new file mode 100644 index 00000000..37241e36 --- /dev/null +++ b/test/case/infix_interfaces/bridge_vlan/Readme.adoc @@ -0,0 +1,27 @@ +=== Bridge VLAN +==== Description +Basic test of VLAN functionality in a bridge + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_vlan/topology.png[Bridge VLAN topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_vlan/topology.png[Bridge VLAN topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Bridge VLAN topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Topology setup +. Connectivity check + + +<<< + diff --git a/test/case/infix_interfaces/bridge_vlan/test.py b/test/case/infix_interfaces/bridge_vlan/test.py index d3896300..a48e97aa 100755 --- a/test/case/infix_interfaces/bridge_vlan/test.py +++ b/test/case/infix_interfaces/bridge_vlan/test.py @@ -7,6 +7,11 @@ # PC ------- e0 e1 ---------------------- e0 # PING --> ¦ dut1 ¦ dut2 # +""" +Bridge VLAN + +Basic test of VLAN functionality in a bridge +""" import infamy with infamy.Test() as test: diff --git a/test/case/infix_interfaces/bridge_vlan/topology.png b/test/case/infix_interfaces/bridge_vlan/topology.png new file mode 100644 index 00000000..483114ef Binary files /dev/null and b/test/case/infix_interfaces/bridge_vlan/topology.png differ diff --git a/test/case/infix_interfaces/bridge_vlan_separation/Readme.adoc b/test/case/infix_interfaces/bridge_vlan_separation/Readme.adoc new file mode 100644 index 00000000..02ef8fb5 --- /dev/null +++ b/test/case/infix_interfaces/bridge_vlan_separation/Readme.adoc @@ -0,0 +1,27 @@ +=== Bridge VLAN separation +==== Description +Test that two VLAN is correctly separaretade in the bridge + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_vlan_separation/topology.png[Bridge VLAN separation topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/bridge_vlan_separation/topology.png[Bridge VLAN separation topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Bridge VLAN separation topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure a bridge with triple physical port +. Ping host:data20 [10.0.0.3] from host:data10 [10.0.0.1] through and host:data21 [10.0.0.4] from host:data11 [10.0.0.2] through + + +<<< + diff --git a/test/case/infix_interfaces/bridge_vlan_separation/test.py b/test/case/infix_interfaces/bridge_vlan_separation/test.py index e70ce034..0f8f9139 100755 --- a/test/case/infix_interfaces/bridge_vlan_separation/test.py +++ b/test/case/infix_interfaces/bridge_vlan_separation/test.py @@ -14,7 +14,11 @@ # | | # | [ HOST ] | # '-----------------------------------------------------------------------------------------' +""" +Bridge VLAN separation +Test that two VLAN is correctly separaretade in the bridge +""" import infamy with infamy.Test() as test: diff --git a/test/case/infix_interfaces/bridge_vlan_separation/topology.png b/test/case/infix_interfaces/bridge_vlan_separation/topology.png new file mode 100644 index 00000000..76a67037 Binary files /dev/null and b/test/case/infix_interfaces/bridge_vlan_separation/topology.png differ diff --git a/test/case/infix_interfaces/dual_bridge/Readme.adoc b/test/case/infix_interfaces/dual_bridge/Readme.adoc new file mode 100644 index 00000000..6164f999 --- /dev/null +++ b/test/case/infix_interfaces/dual_bridge/Readme.adoc @@ -0,0 +1,27 @@ +=== Dual bridges +==== Description +Test that it is possible to ping a bridge through a bridge to another bridge + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/dual_bridge/topology.png[Dual bridges topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/dual_bridge/topology.png[Dual bridges topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Dual bridges topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure two bridges linked with a veth pair furthest bridge has IP 10.0.0.2 +. Ping furthest bridge 10.0.0.2 from host:data with IP 10.0.0.1 + + +<<< + diff --git a/test/case/infix_interfaces/dual_bridge/test.py b/test/case/infix_interfaces/dual_bridge/test.py index a06ae90f..32c02232 100755 --- a/test/case/infix_interfaces/dual_bridge/test.py +++ b/test/case/infix_interfaces/dual_bridge/test.py @@ -4,7 +4,11 @@ # / \ / # PC ---- e0 veth # +""" +Dual bridges +Test that it is possible to ping a bridge through a bridge to another bridge +""" import infamy with infamy.Test() as test: diff --git a/test/case/infix_interfaces/dual_bridge/topology.png b/test/case/infix_interfaces/dual_bridge/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_interfaces/dual_bridge/topology.png differ diff --git a/test/case/infix_interfaces/igmp_basic/Readme.adoc b/test/case/infix_interfaces/igmp_basic/Readme.adoc new file mode 100644 index 00000000..47100399 --- /dev/null +++ b/test/case/infix_interfaces/igmp_basic/Readme.adoc @@ -0,0 +1,31 @@ +=== IGMP basic +==== Description +Test that all multicast gets flooded when IGMP is disabled and +the flooding stops as soon a join arrives + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/igmp_basic/topology.png[IGMP basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/igmp_basic/topology.png[IGMP basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[IGMP basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure device +. Setup sender and receivers +. Verify that the group is flooded on all ports +. Verify that the group is still forwarded to the member +. Verify that the group is no longer forwarded to the non-member + + +<<< + diff --git a/test/case/infix_interfaces/igmp_basic/test.py b/test/case/infix_interfaces/igmp_basic/test.py index f626de4d..f1cfb6a4 100755 --- a/test/case/infix_interfaces/igmp_basic/test.py +++ b/test/case/infix_interfaces/igmp_basic/test.py @@ -16,6 +16,13 @@ # '-------' '-------' '-------' # .2 .3 .4 +""" +IGMP basic + +Test that all multicast gets flooded when IGMP is disabled and +the flooding stops as soon a join arrives +""" + import infamy import time import infamy.multicast as mcast diff --git a/test/case/infix_interfaces/igmp_basic/topology.png b/test/case/infix_interfaces/igmp_basic/topology.png new file mode 100644 index 00000000..0d7557d5 Binary files /dev/null and b/test/case/infix_interfaces/igmp_basic/topology.png differ diff --git a/test/case/infix_interfaces/igmp_vlan/Readme.adoc b/test/case/infix_interfaces/igmp_vlan/Readme.adoc new file mode 100644 index 00000000..1ff7e57f --- /dev/null +++ b/test/case/infix_interfaces/igmp_vlan/Readme.adoc @@ -0,0 +1,29 @@ +=== IGMP VLAN +==== Description +Test tagged IGMP control traffic and that VLAN separation is respected for multicast + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/igmp_vlan/topology.png[IGMP VLAN topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/igmp_vlan/topology.png[IGMP VLAN topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[IGMP VLAN topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure device +. Check multicast receieved on correct port and VLAN +. Multicast does not exist on ports/VLANs where they should not be +. Multicast received on correct port and VLAN + + +<<< + diff --git a/test/case/infix_interfaces/igmp_vlan/test.py b/test/case/infix_interfaces/igmp_vlan/test.py index 1e9047a1..23d990d9 100755 --- a/test/case/infix_interfaces/igmp_vlan/test.py +++ b/test/case/infix_interfaces/igmp_vlan/test.py @@ -21,7 +21,11 @@ # 10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22 # +""" +IGMP VLAN +Test tagged IGMP control traffic and that VLAN separation is respected for multicast +""" import infamy import time diff --git a/test/case/infix_interfaces/igmp_vlan/topology.png b/test/case/infix_interfaces/igmp_vlan/topology.png new file mode 100644 index 00000000..76a67037 Binary files /dev/null and b/test/case/infix_interfaces/igmp_vlan/topology.png differ diff --git a/test/case/infix_interfaces/ipv4_autoconf/Readme.adoc b/test/case/infix_interfaces/ipv4_autoconf/Readme.adoc new file mode 100644 index 00000000..9de0be99 --- /dev/null +++ b/test/case/infix_interfaces/ipv4_autoconf/Readme.adoc @@ -0,0 +1,27 @@ +=== IPv4 linklocal +==== Description +Verifies that linklocal (ZeroConf) work as expected + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/ipv4_autoconf/topology.png[IPv4 linklocal topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/ipv4_autoconf/topology.png[IPv4 linklocal topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[IPv4 linklocal topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure an interface with IPv4 ZeroConf IP +. Wait for linklocal address on interface + + +<<< + diff --git a/test/case/infix_interfaces/ipv4_autoconf/test.py b/test/case/infix_interfaces/ipv4_autoconf/test.py index 444a57d1..7d048d8e 100755 --- a/test/case/infix_interfaces/ipv4_autoconf/test.py +++ b/test/case/infix_interfaces/ipv4_autoconf/test.py @@ -2,7 +2,11 @@ # # PC ---- e0: 10.0.0.2 # +""" +IPv4 linklocal +Verifies that linklocal (ZeroConf) work as expected +""" import infamy import time import infamy.iface diff --git a/test/case/infix_interfaces/ipv4_autoconf/topology.png b/test/case/infix_interfaces/ipv4_autoconf/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_interfaces/ipv4_autoconf/topology.png differ diff --git a/test/case/infix_interfaces/static_multicast_filters/Readme.adoc b/test/case/infix_interfaces/static_multicast_filters/Readme.adoc new file mode 100644 index 00000000..e09df3fd --- /dev/null +++ b/test/case/infix_interfaces/static_multicast_filters/Readme.adoc @@ -0,0 +1,32 @@ +=== Static multicast filters +==== Description +Verify that static multicast filters work (remember that snooping needs to +enabled when using static multicast filters) + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/static_multicast_filters/topology.png[Static multicast filters topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/static_multicast_filters/topology.png[Static multicast filters topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Static multicast filters topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure device without static filter +. Setup sender and receivers +. Verify that the group is flooded on all ports +. Install group filter +. Verify that the group is still forwarded to the member +. Verify that the group is no longer forwarded to the non-member + + +<<< + diff --git a/test/case/infix_interfaces/static_multicast_filters/test.py b/test/case/infix_interfaces/static_multicast_filters/test.py index 57ecb5ea..01c275f6 100755 --- a/test/case/infix_interfaces/static_multicast_filters/test.py +++ b/test/case/infix_interfaces/static_multicast_filters/test.py @@ -16,6 +16,12 @@ # '-------' '-------' '-------' # .2 .3 .4 +""" +Static multicast filters + +Verify that static multicast filters work (remember that snooping needs to +enabled when using static multicast filters) +""" import infamy import time import infamy.multicast as mcast diff --git a/test/case/infix_interfaces/static_multicast_filters/topology.png b/test/case/infix_interfaces/static_multicast_filters/topology.png new file mode 100644 index 00000000..0d7557d5 Binary files /dev/null and b/test/case/infix_interfaces/static_multicast_filters/topology.png differ diff --git a/test/case/infix_interfaces/vlan_qos/Readme.adoc b/test/case/infix_interfaces/vlan_qos/Readme.adoc new file mode 100644 index 00000000..a56b220a --- /dev/null +++ b/test/case/infix_interfaces/vlan_qos/Readme.adoc @@ -0,0 +1,28 @@ +=== VLAN QoS +==== Description +Inject different packets from the host and verify that the VLAN priority +is handled correctly + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_interfaces/vlan_qos/topology.png[VLAN QoS topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_interfaces/vlan_qos/topology.png[VLAN QoS topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[VLAN QoS topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Apply initial config without priority mapping +. Setup host VLANs + + +<<< + diff --git a/test/case/infix_interfaces/vlan_qos/test.py b/test/case/infix_interfaces/vlan_qos/test.py index 3e17f9ce..735bff1a 100755 --- a/test/case/infix_interfaces/vlan_qos/test.py +++ b/test/case/infix_interfaces/vlan_qos/test.py @@ -14,7 +14,12 @@ # Inject tagged packets on host/d1, let target route it over to d2 # where the tag priority is snooped, with different combinations of # pcp<->priority mappings and verify the results. +""" +VLAN QoS +Inject different packets from the host and verify that the VLAN priority +is handled correctly +""" import infamy # Each line represents an injected ICMP request with `id` (tagged with diff --git a/test/case/infix_interfaces/vlan_qos/topology.png b/test/case/infix_interfaces/vlan_qos/topology.png new file mode 100644 index 00000000..fb612860 Binary files /dev/null and b/test/case/infix_interfaces/vlan_qos/topology.png differ diff --git a/test/case/infix_services/Readme.adoc b/test/case/infix_services/Readme.adoc new file mode 100644 index 00000000..e1727046 --- /dev/null +++ b/test/case/infix_services/Readme.adoc @@ -0,0 +1,6 @@ +:testgroup: +== infix-services + +<<< + +include::services_basic/Readme.adoc[] diff --git a/test/case/infix_services/services_basic/Readme.adoc b/test/case/infix_services/services_basic/Readme.adoc new file mode 100644 index 00000000..4ba003f9 --- /dev/null +++ b/test/case/infix_services/services_basic/Readme.adoc @@ -0,0 +1,34 @@ +=== Services basic +==== Description +Verify that basic services like mDNS and LLDP can be enabled and +disabled. We verify operation and non-operation by using tcpdump. + +XXX: with socat in the Docker container we could speed up the LLDP + detection considerably by sending a probe: + +echo -ne '\x01\x80\xc2\x00\x00\x0e\x01\x80\xc2\x00\x00\x0e\x88\xcc\x02\x07\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | socat - UDP4-DATAGRAM:255.255.255.255:7010,broadcast + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/infix_services/services_basic/topology.png[Services basic topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/infix_services/services_basic/topology.png[Services basic topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Services basic topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Set static IPv4 address and disable services +. Start sniffer and enable services on target ... +. Disable services on target, verify they're not running anymore ... + + +<<< + diff --git a/test/case/infix_services/services_basic/test.py b/test/case/infix_services/services_basic/test.py index d13edbc6..730aca5a 100755 --- a/test/case/infix_services/services_basic/test.py +++ b/test/case/infix_services/services_basic/test.py @@ -8,7 +8,18 @@ # # echo -ne "\x01\x80\xc2\x00\x00\x0e\x01\x80\xc2\x00\x00\x0e\x88\xcc\x02\x07\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | socat - UDP4-DATAGRAM:255.255.255.255:7010,broadcast # +""" +Services basic +Verify that basic services like mDNS and LLDP can be enabled and +disabled. We verify operation and non-operation by using tcpdump. + +XXX: with socat in the Docker container we could speed up the LLDP + detection considerably by sending a probe: + +echo -ne '\\x01\\x80\\xc2\\x00\\x00\\x0e\\x01\\x80\\xc2\\x00\\x00\\x0e\\x88\\xcc\\x02\\x07\\x04\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00' | socat - UDP4-DATAGRAM:255.255.255.255:7010,broadcast + +""" import time import infamy diff --git a/test/case/infix_services/services_basic/topology.png b/test/case/infix_services/services_basic/topology.png new file mode 100644 index 00000000..953e7544 Binary files /dev/null and b/test/case/infix_services/services_basic/topology.png differ diff --git a/test/case/misc/Readme.adoc b/test/case/misc/Readme.adoc new file mode 100644 index 00000000..a8d96ffb --- /dev/null +++ b/test/case/misc/Readme.adoc @@ -0,0 +1,6 @@ +:testgroup: +== Misc tests + +<<< + +include::operational_all/Readme.adoc[] diff --git a/test/case/misc/operational_all/Readme.adoc b/test/case/misc/operational_all/Readme.adoc new file mode 100644 index 00000000..2f945887 --- /dev/null +++ b/test/case/misc/operational_all/Readme.adoc @@ -0,0 +1,26 @@ +=== Get all operational +==== Description +Basic test just to get all operational. + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/misc/operational_all/topology.png[Get all operational topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/misc/operational_all/topology.png[Get all operational topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Get all operational topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Get all Operational data + + +<<< + diff --git a/test/case/misc/operational_all/test.py b/test/case/misc/operational_all/test.py index af70f08c..22fb799b 100755 --- a/test/case/misc/operational_all/test.py +++ b/test/case/misc/operational_all/test.py @@ -1,7 +1,11 @@ #!/usr/bin/env python3 # Test that it is possible to get all operational data +""" +Get all operational +Basic test just to get all operational. +""" import infamy import infamy.iface as iface diff --git a/test/case/misc/operational_all/topology.png b/test/case/misc/operational_all/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/misc/operational_all/topology.png differ diff --git a/test/case/misc/start_from_startup/Readme.adoc b/test/case/misc/start_from_startup/Readme.adoc new file mode 100644 index 00000000..7a3a7072 --- /dev/null +++ b/test/case/misc/start_from_startup/Readme.adoc @@ -0,0 +1,28 @@ +=== Undefined +==== Description +Undefined + +==== Topology +ifdef::topdoc[] +image::/home/lazzer/Documents/addiva/infix/test/case/misc/start_from_startup/topology.png[Undefined topology] + +endif::topdoc[] +ifndef::topdoc[] +ifdef::testgroup[] +image::lazzer/Documents/addiva/infix/test/case/misc/start_from_startup/topology.png[Undefined topology] + +endif::testgroup[] +ifndef::testgroup[] +image::topology.png[Undefined topology] + +endif::testgroup[] +endif::topdoc[] +==== Test sequence +. Initialize +. Configure +. Reboot and wait for the unit to come back +. Verify hostname + + +<<< + diff --git a/test/case/misc/start_from_startup/topology.png b/test/case/misc/start_from_startup/topology.png new file mode 100644 index 00000000..5c6b4722 Binary files /dev/null and b/test/case/misc/start_from_startup/topology.png differ diff --git a/test/spec/Readme.adoc b/test/spec/Readme.adoc new file mode 100644 index 00000000..ec32fdc7 --- /dev/null +++ b/test/spec/Readme.adoc @@ -0,0 +1,47 @@ +:topdoc: + += Test specification +This is the test specification for Infix. +:title-page: +:toc: +:toclevels: 2 +:sectnums: +:sectnumlevels: 2 + +<<< +include::../case/misc/Readme.adoc[] + +<<< + +include::../case/ietf_system/Readme.adoc[] + +<<< + +include::../case/ietf_syslog/Readme.adoc[] + +<<< + +include::../case/ietf_interfaces/Readme.adoc[] + +<<< + +include::../case/infix_interfaces/Readme.adoc[] +<<< + +include::../case/ietf_routing/Readme.adoc[] + +<<< + +include::../case/infix_containers/Readme.adoc[] + +<<< + +include::../case/infix_dhcp/Readme.adoc[] + +<<< + +include::../case/ietf_hardware/Readme.adoc[] + +<<< + +include::../case/infix_services/Readme.adoc[] diff --git a/test/spec/Readme.adoc.in b/test/spec/Readme.adoc.in new file mode 100644 index 00000000..bc1c3a39 --- /dev/null +++ b/test/spec/Readme.adoc.in @@ -0,0 +1,47 @@ +:topdoc: + += Test specification +This is the test specification for {REPLACE}. +:title-page: +:toc: +:toclevels: 2 +:sectnums: +:sectnumlevels: 2 + +<<< +include::../case/misc/Readme.adoc[] + +<<< + +include::../case/ietf_system/Readme.adoc[] + +<<< + +include::../case/ietf_syslog/Readme.adoc[] + +<<< + +include::../case/ietf_interfaces/Readme.adoc[] + +<<< + +include::../case/infix_interfaces/Readme.adoc[] +<<< + +include::../case/ietf_routing/Readme.adoc[] + +<<< + +include::../case/infix_containers/Readme.adoc[] + +<<< + +include::../case/infix_dhcp/Readme.adoc[] + +<<< + +include::../case/ietf_hardware/Readme.adoc[] + +<<< + +include::../case/infix_services/Readme.adoc[]