Skip to content

Commit 1f4f67b

Browse files
committed
Use shared warnings and wait times in ripv2 and routing integration tests
1 parent 6dd866a commit 1f4f67b

24 files changed

+168
-144
lines changed

tests/integration/ripv2/01-ipv4.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: |
33
This lab tests the basic RIPv2 deployment. The device under test has two
44
RIPv2 interfaces and has to exchange RIPv2 routes over both of them.
55
6+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
7+
68
module: [ ripv2 ]
79

810
groups:
@@ -27,12 +29,12 @@ validate:
2729
pfx_x1:
2830
description: Check RIPv2 prefixes on X1
2931
wait_msg: Waiting for RIPv2 startup
30-
wait: 60
32+
wait: rip_start
3133
nodes: [ x1 ]
3234
plugin: rt_prefix(nodes.x2.loopback.ipv4,af='ipv4',proto='rip')
3335
pfx_x2:
3436
description: Check RIPv2 prefixes on X2
35-
wait_msg: Waiting for RIPv2 startup
36-
wait: 20
37+
wait_msg: Waiting for RIPv2 updates
38+
wait: rip_update
3739
nodes: [ x2 ]
3840
plugin: rt_prefix(nodes.x1.loopback.ipv4,af='ipv4',proto='rip')

tests/integration/ripv2/02-ipv6.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ message: |
33
This lab tests the basic RIPng deployment. The device under test has two
44
RIPng interfaces and has to exchange RIPng routes over both of them.
55
6-
defaults.sources.extra: [ ipv6-defaults.yml ]
6+
defaults.sources.extra: [ ipv6-defaults.yml, ../wait_times.yml, ../warnings.yml ]
77

88
module: [ ripv2 ]
99

@@ -32,12 +32,12 @@ validate:
3232
pfx_x1:
3333
description: Check RIPng prefixes on X1
3434
wait_msg: Waiting for RIPng startup
35-
wait: 60
35+
wait: rip_start
3636
nodes: [ x1 ]
3737
plugin: rt_prefix(nodes.x2.interfaces[1].ipv6,af='ipv6',proto='ripng')
3838
pfx_x2:
3939
description: Check RIPng prefixes on X2
4040
wait_msg: Waiting for RIPng startup
41-
wait: 20
41+
wait: rip_update
4242
nodes: [ x2 ]
4343
plugin: rt_prefix(nodes.x1.interfaces[1].ipv6,af='ipv6',proto='ripng')

tests/integration/ripv2/10-passive-ipv4.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ message: |
44
the link with X2, so the route from X2 to DUT should go over X1 (and have
55
metric=3)
66
7+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
8+
79
module: [ ripv2 ]
810

911
groups:
@@ -34,6 +36,6 @@ validate:
3436
pfx_x2:
3537
description: Check RIPv2 prefixes on X2
3638
wait_msg: Waiting for RIPv2 startup
37-
wait: 50
39+
wait: rip_start
3840
nodes: [ x2 ]
3941
plugin: rt_prefix(nodes.dut.interfaces[-1].ipv4,af='ipv4',proto='rip',metric=3)

tests/integration/ripv2/11-passive-ipv6.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ message: |
44
the link with X2, so the route from X2 to DUT should go over X1 (and have
55
metric=3)
66
7-
defaults.sources.extra: [ ipv6-defaults.yml ]
7+
defaults.sources.extra: [ ipv6-defaults.yml, ../wait_times.yml, ../warnings.yml ]
88

99
module: [ ripv2 ]
1010

@@ -36,6 +36,6 @@ validate:
3636
pfx_x2:
3737
description: Check RIPv2 prefixes on X2
3838
wait_msg: Waiting for RIPv2 startup
39-
wait: 50
39+
wait: rip_start
4040
nodes: [ x2 ]
4141
plugin: rt_prefix(nodes.dut.interfaces[-1].ipv6,af='ipv6',proto='rip',metric=3)

tests/integration/ripv2/21-import-ds.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defaults.interfaces.mtu: 1500
88

99
defaults.paths.prepend.plugin: [ "topology:../plugin" ]
1010
plugin: [ static_import ]
11-
defaults.sources.extra: [ ../wait_times.yml ]
11+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
1212

1313
addressing:
1414
loopback:
@@ -54,72 +54,72 @@ validate:
5454
ipv4_ebgp:
5555
description: IPv4 EBGP session (X1-DUT) should be established
5656
wait_msg: Wait for EBGP session
57-
wait: 20
57+
wait: ebgp_session
5858
nodes: [ x1 ]
5959
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
6060
ipv6_ebgp:
6161
description: IPv6 EBGP session (X1-DUT) should be established
6262
wait_msg: Wait for EBGP session
63-
wait: 20
63+
wait: ebgp_session
6464
nodes: [ x1 ]
6565
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
6666
ipv4_ospf:
67-
description: OSPF session (R2-DUT) should be established
68-
wait_msg: Wait for OSPF session
69-
wait: 20
67+
description: OSPFv2 session (R2-DUT) should be established
68+
wait_msg: Wait for OSPFv2 session
69+
wait: ospfv2_adj_p2p
7070
nodes: [ r2 ]
7171
plugin: ospf_neighbor(nodes.dut.ospf.router_id)
7272
ipv6_ospf:
7373
description: OSPFv3 session (R2-DUT) should be established
7474
wait_msg: Wait for OSPF session
75-
wait: 30
75+
wait: ospfv3_adj_p2p
7676
nodes: [ r2 ]
7777
plugin: ospf6_neighbor(nodes.dut.ospf.router_id)
7878
rip_bgp_v4:
7979
description: Check whether X1 BGP IPv4 prefix is redistributed into RIP
80-
wait: 30
80+
wait: rip_start
8181
wait_msg: Waiting for the loopback prefix to be originated and redistributed
8282
nodes: [ r3 ]
8383
plugin: rt_prefix(pfx=nodes.x1.loopback.ipv4,af='ipv4',proto='rip')
8484
rip_bgp_v6:
8585
description: Check whether X1 BGP IPv6 prefix is redistributed into RIP
86-
wait: 10
86+
wait: rip_update
8787
wait_msg: Waiting for the loopback prefix to be originated and redistributed
8888
nodes: [ r3 ]
8989
plugin: rt_prefix(pfx=nodes.x1.loopback.ipv6,af='ipv6',proto='rip')
9090
rip_ospf_v4:
9191
description: Check whether R2 OSPF IPv4 prefix is redistributed into RIP
92-
wait: 15
92+
wait: rip_update
9393
wait_msg: Waiting for the loopback prefix to be originated and redistributed
9494
nodes: [ r3 ]
9595
plugin: rt_prefix(pfx=nodes.r2.loopback.ipv4,af='ipv4',proto='rip')
9696
rip_ospf_v6:
9797
description: Check whether R2 OSPF IPv6 prefix is redistributed into RIP
98-
wait: 10
98+
wait: rip_update
9999
wait_msg: Waiting for the loopback prefix to be originated and redistributed
100100
nodes: [ r3 ]
101101
plugin: rt_prefix(pfx=nodes.r2.loopback.ipv6,af='ipv6',proto='rip')
102102
ospf_v4:
103-
description: Check whether R3 RIP IPv4 prefix is redistributed into OSPF
104-
wait: 20
103+
description: Check whether R3 RIP IPv4 prefix is redistributed into OSPFv2
104+
wait: ospfv2_spf
105105
wait_msg: Waiting for the loopback prefix to be originated and redistributed
106106
nodes: [ r2 ]
107107
plugin: ospf_prefix(pfx=nodes.r3.loopback.ipv4)
108108
ospf_v6:
109-
description: Check whether R3 RIP IPv6 prefix is redistributed into OSPF
110-
wait: 15
109+
description: Check whether R3 RIP IPv6 prefix is redistributed into OSPFv3
110+
wait: ospfv3_spf
111111
wait_msg: Waiting for the loopback prefix to be originated and redistributed
112112
nodes: [ r2 ]
113113
plugin: ospf6_prefix(pfx=nodes.r3.interfaces[0].ipv6)
114114
bgp_v4:
115115
description: Check whether R3 RIP IPv4 prefix is redistributed into BGP
116-
wait: 5
116+
wait: bgp_scan_time
117117
wait_msg: Waiting for the loopback prefix to be originated and redistributed
118118
nodes: [ x1 ]
119119
plugin: bgp_prefix(pfx=nodes.r3.loopback.ipv4,af='ipv4')
120120
bgp_v6:
121121
description: Check whether R3 RIP IPv6 prefix is redistributed into BGP
122-
wait: 5
122+
wait: bgp_ios_redist
123123
wait_msg: Waiting for the loopback prefix to be originated and redistributed
124124
nodes: [ x1 ]
125125
plugin: bgp_prefix(pfx=nodes.r3.interfaces[0].ipv6,af='ipv6')

tests/integration/ripv2/31-vrf-ipv4.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ message: |
1111
* r3 and r4 should be able to ping each other
1212
* r1 should not be able to reach r3
1313
14+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
15+
1416
groups:
1517
ce_rip:
1618
members: [ r1, r3 ]
@@ -49,11 +51,11 @@ validate:
4951
wait_msg: Waiting for EBGP sessions to start
5052
nodes: [ r2, r4 ]
5153
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
52-
wait: 10
54+
wait: ebgp_session
5355
stop_on_error: true
5456
red_c_rip:
5557
description: Check connected subnet as RIPv2 prefix on R1
56-
wait: 15
58+
wait: rip_update
5759
wait_msg: Waiting for RIPv2 convergence
5860
fail: DUT is not redistributing connected subnets into RIPv2
5961
nodes: [ r1 ]
@@ -62,14 +64,14 @@ validate:
6264
description: Check for BGP prefix in RIPv2
6365
wait_msg: Waiting for BGP and RIPv2 convergence
6466
fail: BGP is not redistributed into RIPv2
65-
wait: 10
67+
wait: rip_update
6668
nodes: [ r1 ]
6769
plugin: rt_prefix(nodes.r2.loopback.ipv4,af='ipv4',proto='rip')
6870
red_rip_bgp:
6971
description: Check for RIPv2 prefix in BGP
7072
wait_msg: Waiting for RIPv2 and BGP convergence
7173
fail: RIPv2 is not redistributed into BGP
72-
wait: 3
74+
wait: bgp_scan_time
7375
nodes: [ r2 ]
7476
plugin: bgp_prefix(nodes.r1.loopback.ipv4)
7577
red_lb_ping:
@@ -82,7 +84,7 @@ validate:
8284
plugin: ping('r1')
8385
blue_lb_ping:
8486
description: Loopback-to-loopback reachability test in VRF blue
85-
wait: 10
87+
wait: ping_long
8688
nodes: [ r3 ]
8789
plugin: ping('r4',src=nodes.r3.loopback.ipv4)
8890
inter_vrf:

tests/integration/ripv2/32-vrf-ipv6.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ message: |
1111
* r3 and r4 should be able to ping each other
1212
* r1 should not be able to reach r3
1313
14-
defaults.sources.extra: [ ipv6-defaults.yml ]
14+
defaults.sources.extra: [ ipv6-defaults.yml, ../wait_times.yml, ../warnings.yml ]
1515

1616
groups:
1717
ce_rip:
@@ -54,11 +54,11 @@ validate:
5454
wait_msg: Waiting for EBGP sessions to start
5555
nodes: [ r2, r4 ]
5656
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
57-
wait: 20
57+
wait: ebgp_session
5858
stop_on_error: true
5959
red_c_rip:
6060
description: Check connected subnet as RIPng prefix on R1
61-
wait: 15
61+
wait: rip_update
6262
wait_msg: Waiting for RIPng convergence
6363
fail: DUT is not redistributing connected subnets into RIPv2
6464
nodes: [ r1 ]
@@ -67,14 +67,14 @@ validate:
6767
description: Check for BGP prefix in RIPng
6868
wait_msg: Waiting for BGP and RIPng convergence
6969
fail: BGP is not redistributed into RIPng
70-
wait: 10
70+
wait: rip_update
7171
nodes: [ r1 ]
7272
plugin: rt_prefix(nodes.r2.loopback.ipv6,af='ipv6',proto='rip')
7373
red_rip_bgp:
7474
description: Check for RIPng prefix in BGP
7575
wait_msg: Waiting for RIPng and BGP convergence
7676
fail: RIPng is not redistributed into BGP
77-
wait: 40
77+
wait: bgp_ios_redist
7878
nodes: [ r2 ]
7979
plugin: bgp_prefix(nodes.r1.interfaces[0].ipv6,af='ipv6')
8080
red_lb_ping:
@@ -87,7 +87,7 @@ validate:
8787
plugin: ping(nodes.r1.interfaces[0].ipv6,af='ipv6')
8888
blue_lb_ping:
8989
description: Loopback-to-loopback reachability test in VRF blue
90-
wait: 10
90+
wait: ping_long
9191
nodes: [ r3 ]
9292
plugin: ping('r4',src=nodes.r3.interfaces[0].ipv6,af='ipv6')
9393
inter_vrf:

tests/integration/routing/01-locpref.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ message: |
77
plugin: [ bgp.policy ]
88
module: [ bgp, ospf, routing ]
99

10-
defaults.sources.extra: [ defaults-ds.yml ]
10+
defaults.sources.extra: [ defaults-ds.yml, ../wait_times.yml, ../warnings.yml ]
1111

1212
groups:
1313
probes:
@@ -50,72 +50,72 @@ links:
5050
validate:
5151
ebgp_v4:
5252
description: Check IPv4 EBGP sessions with DUT
53-
wait: 20
53+
wait: ebgp_session
5454
nodes: [ x1, x2 ]
5555
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
5656

5757
ibgp_v4:
5858
description: Check IPv4 IBGP sessions with DUT
59-
wait: 40
59+
wait: ibgp_session
6060
nodes: [ probe ]
6161
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
6262

6363
ebgp_v6:
6464
description: Check IPv6 EBGP sessions with DUT
65-
wait: 20
65+
wait: ebgp_session
6666
nodes: [ x1, x2 ]
6767
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
6868

6969
ibgp_v6:
7070
description: Check IPv6 IBGP sessions with DUT
71-
wait: 40
71+
wait: ibgp_session
7272
nodes: [ probe ]
7373
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
7474

7575
pfx_x1_v4:
7676
description: Check for IPv4 X1 prefix on Probe
77-
wait: 10
77+
wait: bgp_scan_long
7878
nodes: [ probe ]
7979
plugin: bgp_prefix(nodes.x1.loopback.ipv4)
8080

8181
pfx_x1_v6:
8282
description: Check for IPv6 X1 prefix on Probe
83-
wait: 15
83+
wait: bgp_scan_long
8484
nodes: [ probe ]
8585
plugin: bgp_prefix(nodes.x1.loopback.ipv6,af='ipv6')
8686

8787
pfx_x2_v4:
8888
description: Check for IPv4 X2 prefix on Probe
89-
wait: 10
89+
wait: bgp_scan_long
9090
nodes: [ probe ]
9191
plugin: bgp_prefix(nodes.x2.loopback.ipv4)
9292

9393
pfx_x2_v6:
9494
description: Check for IPv6 X2 prefix on Probe
95-
wait: 10
95+
wait: bgp_scan_long
9696
nodes: [ probe ]
9797
plugin: bgp_prefix(nodes.x2.loopback.ipv6,af='ipv6')
9898

9999
locpref_x1_v4:
100100
description: Check for node-wide locpref set on IPv4 X1 prefix
101-
wait: 10
101+
wait: bgp_scan_time
102102
nodes: [ probe ]
103103
plugin: bgp_prefix(nodes.x1.loopback.ipv4,locpref=17)
104104

105105
locpref_x1_v6:
106106
description: Check for node-wide locpref set on IPv6 X1 prefix
107-
wait: 10
107+
wait: bgp_scan_time
108108
nodes: [ probe ]
109109
plugin: bgp_prefix(nodes.x1.loopback.ipv6,af='ipv6',locpref=17)
110110

111111
locpref_x2_v4:
112112
description: Check for session-level locpref set on IPv4 X2 prefix
113-
wait: 10
113+
wait: bgp_scan_time
114114
nodes: [ probe ]
115115
plugin: bgp_prefix(nodes.x2.loopback.ipv4,locpref=42)
116116

117117
locpref_x2_v6:
118118
description: Check for session-level locpref set on IPv4 X2 prefix
119-
wait: 10
119+
wait: bgp_scan_time
120120
nodes: [ probe ]
121121
plugin: bgp_prefix(nodes.x2.loopback.ipv6,af='ipv6',locpref=42)

0 commit comments

Comments
 (0)