Skip to content

Commit 30e3efd

Browse files
authored
Use shared warnings and wait times in BGP integration tests (#2521)
1 parent 54d05d6 commit 30e3efd

19 files changed

+95
-68
lines changed

tests/integration/bgp/01-ebgp-session.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: |
33
Use this topology to test the baseline IPv4 EBGP implementation and
44
propagation of routes between EBGP speakers.
55
6+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
7+
68
module: [ bgp ]
79

810
groups:
@@ -29,13 +31,13 @@ validate:
2931
session:
3032
description: Check EBGP sessions with DUT
3133
wait_msg: Wait for BGP sessions to be established
32-
wait: 20
34+
wait: ebgp_session
3335
nodes: [ x1, x2 ]
3436
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3537

3638
prefix:
3739
description: Check whether DUT propagates the beacon prefix
3840
wait_msg: Wait for BGP convergence
39-
wait: 5
41+
wait: bgp_scan_time
4042
nodes: [ x1 ]
4143
plugin: bgp_prefix('172.42.42.0/24')

tests/integration/bgp/02-ibgp-ebgp-session.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: |
33
Use this topology to test the baseline IPv4 IBGP and EBGP implementation
44
and next-hop-self on IBGP sessions.
55
6+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
7+
68
module: [ bgp, ospf ]
79
plugin: [ bgp.session ]
810

@@ -34,27 +36,27 @@ links:
3436
validate:
3537
ospf_adj:
3638
description: Check OSPF adjacencies with DUT
37-
wait: 40
39+
wait: ospfv2_adj_p2p
3840
nodes: [ x1 ]
3941
wait_msg: Waiting for OSPF adjacency process to complete
4042
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
4143
stop_on_error: True
4244
session:
4345
description: Check BGP sessions with DUT
4446
wait_msg: Wait for BGP sessions to be established
45-
wait: 30
47+
wait: ibgp_session
4648
nodes: [ x1, x2 ]
4749
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
4850
stop_on_error: True
4951
prefix:
5052
description: Check whether DUT propagates the beacon prefix
5153
wait_msg: Wait for BGP convergence
52-
wait: 5
54+
wait: bgp_scan_time
5355
nodes: [ x1 ]
5456
plugin: bgp_prefix('172.42.42.0/24')
5557
nhs:
5658
description: Check next-hop handling on DUT
57-
wait: 5
59+
wait: bgp_scan_time
5860
wait_msg: Wait for BGP convergence
5961
nodes: [ x1 ]
6062
plugin: >

tests/integration/bgp/03-ibgp-rr.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ message: |
44
cluster-id) and next-hop handling (change next hop on EBGP but not on
55
reflected route).
66
7+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
8+
79
module: [ bgp, ospf ]
810
plugin: [ bgp.session ]
911

@@ -44,31 +46,31 @@ links:
4446
validate:
4547
ospf_adj_dut:
4648
description: Check OSPF adjacencies with DUT
47-
wait: 40
49+
wait: ospfv2_adj_p2p
4850
nodes: [ r1 ]
4951
wait_msg: Waiting for OSPF adjacency process to complete
5052
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
5153
ospf_adj_r1:
5254
description: Check OSPF adjacencies with R1
53-
wait: 10
55+
wait: ospfv2_adj_p2p
5456
nodes: [ r2, rr2 ]
5557
wait_msg: Waiting for OSPF adjacency process to complete
5658
plugin: ospf_neighbor(nodes.r1.ospf.router_id)
5759
session:
5860
description: Check BGP sessions with DUT
5961
wait_msg: Wait for BGP sessions to be established
60-
wait: 30
62+
wait: ibgp_session
6163
nodes: [ r1, r2, rr2, x1 ]
6264
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
6365
prefix:
64-
wait: 5
66+
wait: bgp_scan_time
6567
description: Check whether DUT propagates the external beacon prefix
6668
wait_msg: Wait for BGP convergence
6769
nodes: [ r1, r2, rr2 ]
6870
plugin: bgp_prefix('172.42.42.0/24')
6971
nhs:
7072
description: Check next-hop handling on DUT
71-
wait: 5
73+
wait: bgp_scan_time
7274
wait_msg: Wait for BGP convergence
7375
nodes: [ r1, r2 ]
7476
plugin: >
@@ -77,12 +79,12 @@ validate:
7779
nh=nodes.dut.loopback.ipv4 if 'loopback' in nodes.dut else nodes.dut.interfaces[0].ipv4)
7880
reflect:
7981
description: Check route reflection on DUT
80-
wait: 5
82+
wait: bgp_scan_time
8183
nodes: [ r2 ]
8284
plugin: bgp_prefix('172.0.42.0/24',peer=nodes.dut.bgp.router_id)
8385
inact:
8486
description: Check route reflection of inactive routes on DUT
85-
wait: 2
87+
wait: bgp_scan_time
8688
nodes: [ r2 ]
8789
level: warning
8890
plugin: bgp_prefix('10.0.0.10/32',peer=nodes.dut.bgp.router_id)

tests/integration/bgp/04-originate.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: |
33
Use this topology to test the origination and propagation
44
of IPv4 prefixes.
55
6+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
7+
68
module: [ bgp ]
79

810
groups:
@@ -44,26 +46,26 @@ links:
4446
validate:
4547
ospf_adj:
4648
description: Check OSPF session with DUT
47-
wait: 30
49+
wait: ospfv2_adj_p2p
4850
wait_msg: Wait for OSPF session to be established
4951
nodes: [ r1 ]
5052
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
5153
bgp_adj:
5254
description: Check BGP sessions with DUT
53-
wait: 30
55+
wait: ibgp_session
5456
wait_msg: Wait for BGP sessions to be established
5557
nodes: [ x1, x2, r1 ]
5658
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
5759
originate:
5860
description: Check whether DUT originates the beacon prefix
5961
wait_msg: Wait for prefix origination and BGP convergence
60-
wait: 30
62+
wait: bgp_scan_long
6163
nodes: [ x1, x2, r1 ]
6264
plugin: bgp_prefix('172.42.42.0/24')
6365
loopback:
6466
description: Check whether DUT2 originates the loopback prefix
6567
wait_msg: Wait for prefix origination and BGP convergence
66-
wait: 15
68+
wait: bgp_scan_long
6769
nodes: [ x1, x2, r1 ]
6870
plugin: bgp_prefix('10.0.0.2/32')
6971
stub:

tests/integration/bgp/05-community.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ message: |
88
Three BGP communities are attached to the prefix advertised by RC: a standard
99
one, an extended one, and a long one (standard communitiy using 4-octet AS)
1010
11+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
12+
1113
module: [ bgp, ospf ]
1214

1315
groups:
@@ -29,6 +31,7 @@ nodes:
2931
config: [ frr-community ]
3032
r2:
3133
x1:
34+
module: [ bgp ]
3235
bgp.as: 65101
3336

3437
links:
@@ -40,18 +43,17 @@ validate:
4043
session:
4144
description: Check BGP sessions with DUT
4245
wait_msg: Wait for BGP sessions to be established
43-
wait: 40
46+
wait: ibgp_session
4447
nodes: [ rc, r2, x1 ]
4548
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
4649
prefix:
4750
description: Check whether DUT propagates the beacon prefix
4851
wait_msg: Wait for BGP convergence
49-
wait: 5
52+
wait: bgp_scan_time
5053
nodes: [ r2, x1 ]
5154
plugin: bgp_prefix('172.0.42.0/24')
5255
ibgp_comm:
5356
description: Check community propagation on IBGP sessions
54-
wait_msg: Wait for BGP convergence
5557
nodes: [ r2 ]
5658
plugin: >
5759
bgp_prefix(

tests/integration/bgp/06-unnumbered.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ message: |
55
66
module: [ bgp ]
77

8+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
9+
810
groups:
911
probes:
1012
device: frr
@@ -40,21 +42,21 @@ links:
4042
validate:
4143
session:
4244
description: Check EBGP sessions with DUT (wait up to 30 seconds)
43-
wait: 30
45+
wait: ebgp_session
4446
wait_msg: Wait for BGP sessions to be established
4547
nodes: [ x1, x2, x3 ]
4648
plugin: bgp_neighbor(node.bgp.neighbors,'dut',intf=node.interfaces[0].ifname)
4749

4850
pfx_x2:
4951
description: Check whether DUT propagates the X2 prefix
50-
wait: 5
52+
wait: bgp_scan_time
5153
wait_msg: Wait for BGP convergence
5254
nodes: [ x1 ]
5355
plugin: bgp_prefix('172.42.42.0/24')
5456

5557
pfx_x3:
5658
description: Check whether DUT propagates the X3 prefix
57-
wait: 5
59+
wait: bgp_scan_time
5860
wait_msg: Wait for BGP convergence
5961
nodes: [ x1 ]
6062
plugin: bgp_prefix('172.42.43.0/24')

tests/integration/bgp/07-ebgp-localas.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ message: |
44
device under test uses a different AS on DUT-X1 session and shall still
55
propagate routes between X1 and X2
66
7+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
8+
79
module: [ bgp ]
810

911
groups:
@@ -33,13 +35,13 @@ validate:
3335
session:
3436
description: Check EBGP sessions with DUT (wait up to 10 seconds)
3537
wait_msg: Wait for BGP sessions to be established
36-
wait: 20
38+
wait: ebgp_session
3739
nodes: [ x1, x2 ]
3840
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3941

4042
prefix:
4143
description: Check whether DUT advertises the beacon prefix
42-
wait: 20
44+
wait: bgp_scan_long
4345
wait_msg: Wait for BGP prefix origination and BGP convergence
4446
nodes: [ x1, x2 ]
4547
plugin: bgp_prefix('172.42.42.0/24')

tests/integration/bgp/08-ibgp-localas.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ message: |
1010
not set correctly, or that DUT is not working as a route reflector toward
1111
local-as IBGP neighbor.
1212
13+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
14+
1315
module: [ bgp, ospf ]
1416

1517
groups:
@@ -48,20 +50,20 @@ links:
4850
validate:
4951
ospf_adj_dut:
5052
description: Check OSPF adjacencies with DUT
51-
wait: 40
53+
wait: ospfv2_adj_p2p
5254
nodes: [ x3 ]
5355
wait_msg: Waiting for OSPF adjacency process to complete
5456
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
5557
session:
5658
description: Check BGP sessions with DUT (wait up to 10 seconds)
57-
wait: 20
59+
wait: ibgp_session
5860
wait_msg: Wait for BGP sessions to be established
5961
nodes: [ x1, x2, x3 ]
6062
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
6163

6264
prefix:
6365
description: Check whether DUT advertises the beacon prefix
64-
wait: 20
66+
wait: bgp_scan_long
6567
wait_msg: Wait for BGP prefix origination and BGP convergence
6668
nodes: [ x1, x2 ]
6769
plugin: bgp_prefix('172.42.42.0/24')

tests/integration/bgp/09-vrf-localas.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ message: |
44
The device under test uses a different AS on DUT-X1 session and shall still
55
propagate routes between X1 and X2
66
7+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
8+
79
module: [ bgp, vrf ]
810

911
groups:
@@ -36,13 +38,13 @@ validate:
3638
session:
3739
description: Check EBGP sessions with DUT (wait up to 10 seconds)
3840
wait_msg: Wait for BGP sessions to be established
39-
wait: 20
41+
wait: ebgp_session
4042
nodes: [ x1, x2 ]
4143
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
4244

4345
prefix:
4446
description: Check whether DUT propagates the beacon prefix
45-
wait: 20
47+
wait: bgp_scan_long
4648
wait_msg: Wait for BGP prefix origination and BGP convergence
4749
nodes: [ x2 ]
4850
plugin: bgp_prefix('172.42.42.0/24')

tests/integration/bgp/11-ipv6-ebgp.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ message: |
33
Use this topology to test the baseline IPv6 EBGP implementation and
44
propagation of routes between EBGP speakers.
55
6-
defaults.sources.extra: [ defaults-ipv6.yml ]
6+
defaults.sources.extra: [ defaults-ipv6.yml, ../wait_times.yml, ../warnings.yml ]
77

88
module: [ bgp ]
99

@@ -32,13 +32,13 @@ validate:
3232
session:
3333
description: Check EBGP sessions with DUT (wait up to 10 seconds)
3434
wait_msg: Waiting for EBGP session to be established
35-
wait: 20
35+
wait: ebgp_session
3636
nodes: [ x1, x2 ]
3737
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
3838

3939
prefix:
4040
description: Check whether DUT propagates the beacon prefix
4141
wait_msg: Waiting for BGP convergence
42-
wait: 3
42+
wait: bgp_scan_time
4343
nodes: [ x1 ]
4444
plugin: bgp_prefix('2001:db8:cafe:1::/64',af='ipv6')

0 commit comments

Comments
 (0)