tests: Add test specification

Add minor changes in all testscripts, to add name and description
Add generated test specification
Add generated topology image
This commit is contained in:
Mattias Walström
2024-09-06 10:18:16 +02:00
parent 4e41663987
commit e4e7dbd714
135 changed files with 1625 additions and 24 deletions
+8
View File
@@ -0,0 +1,8 @@
:testgroup:
== ietf-hardware
<<<
include::usb/Readme.adoc[]
include::usb_two_ports/Readme.adoc[]
+42
View File
@@ -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
<<<
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -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
<<<
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+16
View File
@@ -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[]
@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<
@@ -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 <if-index> for <{interface}> interface"):
assert_if_index(target, interface)
with test.step(f"Verifying <oper-status> for <{interface}> interface"):
assert_oper_status(target, interface)
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -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 ...
<<<
@@ -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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<
@@ -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):
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

@@ -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)
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

+13
View File
@@ -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[]
@@ -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
<<<
+7 -1
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

@@ -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
<<<
@@ -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):
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

+8
View File
@@ -0,0 +1,8 @@
:testgroup:
== ietf-syslog
<<<
include::basic/Readme.adoc[]
include::remote/Readme.adoc[]
+28
View File
@@ -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 ...
<<<
+4 -2
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+28
View File
@@ -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
<<<
+2
View File
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
"""
Remote syslog
Verify logging to remote, acting as a remote, and RFC5424 log format.
"""
import infamy
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

+14
View File
@@ -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[]
@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -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
<<<
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
"""
Set hostname
Verify that it is possible to change hostname
"""
import random
import string
import re
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -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.
<<<
+4
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -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.
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+26
View File
@@ -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
<<<
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
"""
Upgrade
Verify it is possible to upgrade
"""
import concurrent.futures
import functools
import http.server
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@@ -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
<<<
+5 -3
View File
@@ -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
"""
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+12
View File
@@ -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[]
@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

+10
View File
@@ -0,0 +1,10 @@
:testgroup:
== infix-dhcp
<<<
include::dhcp_basic/Readme.adoc[]
include::dhcp_router/Readme.adoc[]
include::dhcp_routes/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
<<<
+6
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<
+5
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<
+5
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

+26
View File
@@ -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[]
@@ -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
<<<
@@ -4,7 +4,11 @@
# /
# PC ---- e0
#
"""
Bridge basic
Test basic connectivity to a bridge
"""
import infamy
with infamy.Test() as test:
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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]
<<<
@@ -14,7 +14,11 @@
# | |
# | [ HOST ] |
# '-----------------------------------------------------------------------------------------'
"""
Bridge forwarding dual DUTs
Ping through both DUTs using bridged ports.
"""
import infamy
with infamy.Test() as test:
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@@ -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]
<<<
@@ -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()
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

@@ -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
<<<
@@ -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:
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -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
<<<

Some files were not shown because too many files have changed in this diff Show More