Skip to content

Commit

Permalink
Rewrite the LAG integration tests
Browse files Browse the repository at this point in the history
Integration tests should contain the minimum topology required to
test an individual feature to simplify the troubleshooting. Ideally,
they would contain a single device under test and another 'standard'
device to test device interworking.

Finally, it's always better to hop-by-hop control-plane features (for
example, OSPF adjacency) than end-to-end pings.
  • Loading branch information
ipspace committed Nov 3, 2024
1 parent 7829ae6 commit 0829238
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 74 deletions.
43 changes: 16 additions & 27 deletions tests/integration/lag/01-l3-lag.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
---
message: |
The devices under test are a pair of routers with a L3 LAG link between them
h1 and h2 should be able to ping each other
The device under is a router with a L3 LAG link connected to a FRR device. The
devices should be able to establish an OSPF adjacency.
groups:
_auto_create: True
hosts:
members: [ h1, h2 ]
device: linux
provider: clab
switches:
members: [ r1,r2,r3 ]
members: [ dut, xr ]
module: [ lag, ospf ]

nodes:
dut:
xr:
device: frr

links:
- lag.members: [r1-r2,r1-r2]
- lag.ifindex: 0 # Name it as 'bond0' -> First one becomes 'bond1'
lag.members:
- r2:
ifindex: 3
r3:
ifindex: 3
- r2:
ifindex: 4
r3:
ifindex: 4
- h1-r1
- r3-h2
- lag.members: [ dut-xr, dut-xr ]

validate:
ping:
description: Pinging H2 from H1
nodes: [ h1 ]
wait_msg: Waiting for STP to enable the ports
wait: 45
plugin: ping('h2')
adj:
description: Check OSPF adjacencies
wait_msg: Waiting for OSPF adjacency process to complete
wait: 50
nodes: [ xr ]
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
47 changes: 0 additions & 47 deletions tests/integration/lag/02-l3-lag-with-vlans.yml

This file was deleted.

40 changes: 40 additions & 0 deletions tests/integration/lag/02-lag-vlan-trunk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
message: |
The device under test is a layer-2 switch connected with a LAG VLAN trunk to
another layer-2 switch. Host in the same VLAN should be able to ping each
other.
groups:
_auto_create: True
hosts:
members: [ h1, h2, h3, h4 ]
device: linux
provider: clab
switches:
members: [ dut, xs ]
module: [ lag, vlan ]
probe:
members: [ xs ]
device: frr

vlans:
v1:
links: [ dut-h1, xs-h2 ]
v2:
links: [ dut-h3, xs-h4 ]

links:
- vlan.trunk: [ v1, v2 ]
lag.members: [ dut-xs, dut-xs ]

validate:
ping_v1:
description: Pinging H2 from H1 on VLAN v1
nodes: [ h1 ]
wait_msg: Waiting for STP to enable the ports
wait: 45
plugin: ping('h2')
ping_v2:
description: Pinging H4 from H3 on VLAN v2
wait: 10
nodes: [ h3 ]
plugin: ping('h4')

0 comments on commit 0829238

Please sign in to comment.