test: minor, cleanup of specifications

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2025-09-28 07:26:45 +02:00
parent c61b4361ab
commit c42b0b536d
5 changed files with 33 additions and 50 deletions
+11 -16
View File
@@ -4,23 +4,19 @@ ifdef::topdoc[:imagesdir: {topdoc}../../test/case/ietf_interfaces/igmp_vlan]
==== Description
Test tagged IGMP control traffic and that VLAN separation is respected for multicast
Verify VLAN tagged IGMP control traffic and that VLAN separation is respected for multicast.
....
VLAN55 VLAN77 VLAN55 VLAN77
10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2
vlan55 10.0.1.1 vlan77 10.0.2.1 vlan55 10.0.1.2 vlan77 10.0.2.2
\ / \ /
\--------------/ VLAN 1,2 T \---------------/
| DUT1 +---------------------------------+ DUT2 |
| |dut1:link dut2:link| |
+--------------+ +-----+---------+
dut1:data1| |dut1:data2 dut2:data1| |dut2:data2
VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U
| | | |
+-------+ | +----------+ +------------+ +--------+
| msend +--+ | mreceive | | mreceive | | msend |
+-------+ +----------+ +------------+ +--------+
10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22
.--------------. VLAN 1,2 T .---------------.
| DUT1 link +--------------------------------+ link DUT2 |
'-+----------+-' '-+-----------+-'
data1 | 55U 77U | data2 data1 | 55U 77U | data2
.-------' '---. | '-------.
.----+--. .-+--------. .-------+--. .--+----.
| msend | 10.0.1.11 | mreceive | 10.0.2.11 | mreceive | 10.0.1.22 | msend | 10.0.2.22
'-------' '----------' '----------' '-------'
....
==== Topology
@@ -31,8 +27,7 @@ image::topology.svg[IGMP VLAN topology, align=center, scaledwidth=75%]
. Set up topology and attach to target DUT
. Configure device
. Start multicast sender on host:data11, group 224.2.2.2
. Start multicast sender on host:data22, group 224.1.1.1
. Start multicast senders on host:data11, group 224.2.2.2, and host:data22, group 224.1.1.1
. Verify group 224.2.2.2 is flooded to host:data21
. Verify group 224.1.1.1 is flooded to host:data12
. Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received
+13 -21
View File
@@ -1,26 +1,20 @@
#!/usr/bin/env python3
r"""
IGMP VLAN
r"""IGMP VLAN
Test tagged IGMP control traffic and that VLAN separation is respected for multicast
Verify VLAN tagged IGMP control traffic and that VLAN separation is respected for multicast.
....
VLAN55 VLAN77 VLAN55 VLAN77
10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2
vlan55 10.0.1.1 vlan77 10.0.2.1 vlan55 10.0.1.2 vlan77 10.0.2.2
\ / \ /
\--------------/ VLAN 1,2 T \---------------/
| DUT1 +---------------------------------+ DUT2 |
| |dut1:link dut2:link| |
+--------------+ +-----+---------+
dut1:data1| |dut1:data2 dut2:data1| |dut2:data2
VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U
| | | |
+-------+ | +----------+ +------------+ +--------+
| msend +--+ | mreceive | | mreceive | | msend |
+-------+ +----------+ +------------+ +--------+
10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22
.--------------. VLAN 1,2 T .---------------.
| DUT1 link +--------------------------------+ link DUT2 |
'-+----------+-' '-+-----------+-'
data1 | 55U 77U | data2 data1 | 55U 77U | data2
.-------' '---. | '-------.
.----+--. .-+--------. .-------+--. .--+----.
| msend | 10.0.1.11 | mreceive | 10.0.2.11 | mreceive | 10.0.1.22 | msend | 10.0.2.22
'-------' '----------' '----------' '-------'
....
"""
import infamy
@@ -262,11 +256,9 @@ with infamy.Test() as test:
d2send_ns.addip("10.0.2.22")
d1send_ns.must_reach("10.0.1.2")
d1receive_ns.must_reach("10.0.2.2")
with test.step("Start multicast sender on host:data11, group 224.2.2.2"):
with test.step("Start multicast senders on host:data11, group 224.2.2.2, and host:data22, group 224.1.1.1"):
vlan55_sender = mcast.MCastSender(d2send_ns, "224.2.2.2")
with test.step("Start multicast sender on host:data22, group 224.1.1.1"):
vlan77_sender= mcast.MCastSender(d1send_ns, "224.1.1.1")
vlan77_sender = mcast.MCastSender(d1send_ns, "224.1.1.1")
with vlan55_sender, vlan77_sender:
with test.step("Verify group 224.2.2.2 is flooded to host:data21"):
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
"""
Container basic
"""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
@@ -5,7 +5,7 @@ ifdef::topdoc[:imagesdir: {topdoc}../../test/case/infix_containers/container_fir
==== Description
Verify that an nftables container can be used for IP masquerading and
port forwarding to another container running a basic web server.
port forwarding to another container.
....
<--- Docker containers --->
@@ -24,10 +24,9 @@ network, using a VETH pair, serving HTTP on port 91.
The firewall container sets up a port forward with IP masquerding
to/from `ext0:8080` to 10.0.0.2:91.
Correct operation is verified using HTTP GET requests for internal port
91 and external port 8080, to ensure the web page, with a known key
phrase, is only reachable from the public interface `ext0`, on
192.168.0.1:8080.
Operation is verified using HTTP GET requests for internal port 91 and
external port 8080 to ensure the web page, with a known key phrase, is
only reachable from the public interface `ext0`, on 192.168.0.1:8080.
==== Topology
@@ -2,7 +2,7 @@
r"""Basic Firewall Container
Verify that an nftables container can be used for IP masquerading and
port forwarding to another container running a basic web server.
port forwarding to another container.
....
<--- Docker containers --->
@@ -21,11 +21,9 @@ network, using a VETH pair, serving HTTP on port 91.
The firewall container sets up a port forward with IP masquerding
to/from `ext0:8080` to 10.0.0.2:91.
Correct operation is verified using HTTP GET requests for internal port
91 and external port 8080, to ensure the web page, with a known key
phrase, is only reachable from the public interface `ext0`, on
192.168.0.1:8080.
Operation is verified using HTTP GET requests for internal port 91 and
external port 8080 to ensure the web page, with a known key phrase, is
only reachable from the public interface `ext0`, on 192.168.0.1:8080.
"""
import infamy
from infamy.util import until, to_binary