Skip to content

Commit 22bf9ec

Browse files
committed
Use shared warnings and wait times in bgp.policy integration tests (#2522)
Note: some tests have an arbitrary wait time between checking for a prefix and for its attributes due to the wonderful behavior of Aruba CX.
1 parent 30e3efd commit 22bf9ec

11 files changed

+74
-64
lines changed

tests/integration/bgp.policy/10-bgp-bandwidth-auto.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 'auto bgp bandwidth' functionality. The DUT has to copy
44
interface bandwidth into BGP bandwidth community and propagate that on IBGP updates.
55
6+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
7+
68
plugin: [ bgp.policy ]
79
module: [ bgp, ospf ]
810

@@ -33,12 +35,12 @@ links:
3335
validate:
3436
session:
3537
description: Check BGP sessions with DUT
36-
wait: 40
38+
wait: ibgp_session
3739
nodes: [ x1, x2 ]
3840
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3941

4042
prefix:
4143
description: Check for X2 prefix on X1
42-
wait: 10
44+
wait: bgp_scan_long
4345
nodes: [ x1, x2 ]
4446
plugin: bgp_prefix(nodes.x2.loopback.ipv4)

tests/integration/bgp.policy/11-bgp-bandwidth-value.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ message: |
44
The DUT has to set BGP bandwidth community on updates received from X2 to 100
55
Mbps and propagate that on IBGP updates.
66
7+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
8+
79
plugin: [ bgp.policy ]
810
module: [ bgp, ospf ]
911

@@ -33,12 +35,12 @@ links:
3335
validate:
3436
session:
3537
description: Check BGP sessions with DUT
36-
wait: 40
38+
wait: ebgp_session
3739
nodes: [ x1, x2 ]
3840
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3941

4042
prefix:
4143
description: Check for X2 prefix on X1
42-
wait: 10
44+
wait: bgp_scan_time
4345
nodes: [ x1, x2 ]
4446
plugin: bgp_prefix(nodes.x2.loopback.ipv4)

tests/integration/bgp.policy/12-bgp-bandwidth-value-out.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ message: |
44
The DUT has to set BGP bandwidth community on updates received from X2 to 100
55
Mbps and propagate that on IBGP updates.
66
7+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
8+
79
plugin: [ bgp.policy ]
810
module: [ bgp, ospf ]
911

@@ -33,12 +35,12 @@ links:
3335
validate:
3436
session:
3537
description: Check BGP sessions with DUT
36-
wait: 40
38+
wait: ibgp_session
3739
nodes: [ x1, x2 ]
3840
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3941

4042
prefix:
4143
description: Check for X2 prefix on X1
42-
wait: 10
44+
wait: bgp_scan_time
4345
nodes: [ x1, x2 ]
4446
plugin: bgp_prefix(nodes.x2.loopback.ipv4)

tests/integration/bgp.policy/21-locpref.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ message: |
44
has to set node-wide local preference on prefixes received from X1 and
55
neighbor-specific local preference on prefixes received from X2.
66
7+
defaults.sources.extra: [ defaults-ds.yml, ../wait_times.yml, ../warnings.yml ]
8+
79
plugin: [ bgp.policy ]
810
module: [ bgp, ospf ]
911

10-
defaults.sources.extra: [ defaults-ds.yml ]
11-
1212
groups:
1313
probes:
1414
device: frr
@@ -44,72 +44,72 @@ links:
4444
validate:
4545
ebgp_v4:
4646
description: Check IPv4 EBGP sessions with DUT
47-
wait: 20
47+
wait: ebgp_session
4848
nodes: [ x1, x2 ]
4949
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
5050

5151
ebgp_v6:
5252
description: Check IPv6 EBGP sessions with DUT
53-
wait: 20
53+
wait: ebgp_session
5454
nodes: [ x1, x2 ]
5555
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
5656

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

6363
ibgp_v6:
6464
description: Check IBGP IPv6 sessions with DUT
65-
wait: 30
65+
wait: ibgp_session
6666
nodes: [ probe ]
6767
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
6868

6969
pfx_x1_v4:
7070
description: Check for IPv4 X1 prefix on Probe
71-
wait: 10
71+
wait: bgp_scan_time
7272
nodes: [ probe ]
7373
plugin: bgp_prefix(nodes.x1.loopback.ipv4)
7474

7575
pfx_x1_v6:
7676
description: Check for IPv6 X1 prefix on Probe
77-
wait: 10
77+
wait: bgp_scan_time
7878
nodes: [ probe ]
7979
plugin: bgp_prefix(nodes.x1.loopback.ipv6,af='ipv6')
8080

8181
pfx_x2_v4:
8282
description: Check for IPv4 X2 prefix on Probe
83-
wait: 5
83+
wait: bgp_scan_time
8484
nodes: [ probe ]
8585
plugin: bgp_prefix(nodes.x2.loopback.ipv4)
8686

8787
pfx_x2_v6:
8888
description: Check for IPv6 X2 prefix on Probe
89-
wait: 5
89+
wait: bgp_scan_time
9090
nodes: [ probe ]
9191
plugin: bgp_prefix(nodes.x2.loopback.ipv6,af='ipv6')
9292

9393
locpref_x1_v4:
9494
description: Check for node-wide locpref set on IPv4 X1 prefix
9595
nodes: [ probe ]
96-
wait: 10
96+
wait: bgp_scan_time
9797
plugin: bgp_prefix(nodes.x1.loopback.ipv4,locpref=17)
9898

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

105105
locpref_x2_v4:
106106
description: Check for session-level locpref set on IPv4 X2 prefix
107-
wait: 10
107+
wait: bgp_scan_time
108108
nodes: [ probe ]
109109
plugin: bgp_prefix(nodes.x2.loopback.ipv4,locpref=42)
110110

111111
locpref_x2_v6:
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.ipv6,af='ipv6',locpref=42)

tests/integration/bgp.policy/22-locpref-unnumbered.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ message: |
77
plugin: [ bgp.policy ]
88
module: [ bgp, ospf ]
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:
@@ -46,60 +46,60 @@ links:
4646
validate:
4747
ebgp:
4848
description: Check EBGP sessions with DUT
49-
wait: 20
49+
wait: ebgp_session
5050
nodes: [ x1, x2 ]
5151
plugin: bgp_neighbor(node.bgp.neighbors,'dut',intf=node.interfaces[0].ifname)
5252

5353
ibgp:
5454
description: Check IBGP sessions with DUT
55-
wait: 30
55+
wait: ibgp_session
5656
nodes: [ probe ]
5757
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
5858

5959
pfx_x1_v4:
6060
description: Check for IPv4 X1 prefix on Probe
61-
wait: 10
61+
wait: bgp_scan_time
6262
nodes: [ probe ]
6363
plugin: bgp_prefix(nodes.x1.loopback.ipv4)
6464

6565
pfx_x1_v6:
6666
description: Check for IPv6 X1 prefix on Probe
67-
wait: 10
67+
wait: bgp_scan_time
6868
nodes: [ probe ]
6969
plugin: bgp_prefix(nodes.x1.loopback.ipv6,af='ipv6')
7070

7171
pfx_x2_v4:
7272
description: Check for IPv4 X2 prefix on Probe
73-
wait: 5
73+
wait: bgp_scan_time
7474
nodes: [ probe ]
7575
plugin: bgp_prefix(nodes.x2.loopback.ipv4)
7676

7777
pfx_x2_v6:
7878
description: Check for IPv6 X2 prefix on Probe
79-
wait: 5
79+
wait: bgp_scan_time
8080
nodes: [ probe ]
8181
plugin: bgp_prefix(nodes.x2.loopback.ipv6,af='ipv6')
8282

8383
locpref_x1_v4:
8484
description: Check for node-wide locpref set on IPv4 X1 prefix
85-
wait: 10
85+
wait: bgp_scan_time
8686
nodes: [ probe ]
8787
plugin: bgp_prefix(nodes.x1.loopback.ipv4,locpref=17)
8888

8989
locpref_x1_v6:
9090
description: Check for node-wide locpref set on IPv6 X1 prefix
91-
wait: 10
91+
wait: bgp_scan_time
9292
nodes: [ probe ]
9393
plugin: bgp_prefix(nodes.x1.loopback.ipv6,af='ipv6',locpref=17)
9494

9595
locpref_x2_v4:
9696
description: Check for session-level locpref set on IPv4 X2 prefix
97-
wait: 10
97+
wait: bgp_scan_time
9898
nodes: [ probe ]
9999
plugin: bgp_prefix(nodes.x2.loopback.ipv4,locpref=42)
100100

101101
locpref_x2_v6:
102102
description: Check for session-level locpref set on IPv4 X2 prefix
103-
wait: 10
103+
wait: bgp_scan_time
104104
nodes: [ probe ]
105105
plugin: bgp_prefix(nodes.x2.loopback.ipv6,af='ipv6',locpref=42)

tests/integration/bgp.policy/31-med.yml

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

9-
defaults.sources.extra: [ defaults-ds.yml ]
9+
defaults.sources.extra: [ defaults-ds.yml, ../wait_times.yml, ../warnings.yml ]
1010

1111
groups:
1212
probes:
@@ -33,36 +33,36 @@ links:
3333
validate:
3434
ebgp_v4:
3535
description: Check IPv4 EBGP session with DUT
36-
wait: 20
36+
wait: ebgp_session
3737
nodes: [ probe ]
3838
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3939

4040
ebgp_v6:
4141
description: Check IPv6 EBGP session with DUT
42-
wait: 20
42+
wait: ebgp_session
4343
nodes: [ probe ]
4444
plugin: bgp_neighbor(node.bgp.neighbors,'dut',af='ipv6')
4545

4646
pfx_v4:
4747
description: Check for IPv4 DUT prefix on Probe
48-
wait: 30
48+
wait: bgp_scan_time
4949
nodes: [ probe ]
5050
plugin: bgp_prefix(nodes.dut.loopback.ipv4)
5151

5252
pfx_v6:
5353
description: Check for IPv6 DUT prefix on Probe
54-
wait: 30
54+
wait: bgp_scan_time
5555
nodes: [ probe ]
5656
plugin: bgp_prefix(nodes.dut.loopback.ipv6,af='ipv6')
5757

5858
med_v4:
5959
description: Check for MED on DUT IPv4 prefix
60-
wait: 10
60+
wait: bgp_scan_long
6161
nodes: [ probe ]
6262
plugin: bgp_prefix(nodes.dut.loopback.ipv4,med=42)
6363

6464
med_v6:
6565
description: Check for MED on DUT IPv6 prefix
66-
wait: 10
66+
wait: bgp_scan_long
6767
nodes: [ probe ]
6868
plugin: bgp_prefix(nodes.dut.loopback.ipv6,af='ipv6',med=42)

tests/integration/bgp.policy/32-med-unnumbered.yml

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

9-
defaults.sources.extra: [ defaults-ds.yml ]
9+
defaults.sources.extra: [ defaults-ds.yml, ../wait_times.yml, ../warnings.yml ]
1010

1111
groups:
1212
probes:
@@ -34,30 +34,30 @@ links:
3434
validate:
3535
ebgp:
3636
description: Check EBGP session with DUT
37-
wait: 20
37+
wait: ebgp_session
3838
nodes: [ probe ]
3939
plugin: bgp_neighbor(node.bgp.neighbors,'dut',intf=node.interfaces[0].ifname)
4040

4141
pfx_v4:
4242
description: Check for IPv4 DUT prefix on Probe
43-
wait: 5
43+
wait: bgp_scan_time
4444
nodes: [ probe ]
4545
plugin: bgp_prefix(nodes.dut.loopback.ipv4)
4646

4747
pfx_v6:
4848
description: Check for IPv6 DUT prefix on Probe
49-
wait: 5
49+
wait: bgp_scan_time
5050
nodes: [ probe ]
5151
plugin: bgp_prefix(nodes.dut.loopback.ipv6,af='ipv6')
5252

5353
med_v4:
5454
description: Check for MED on DUT IPv4 X1 prefix
55-
wait: 10
5655
nodes: [ probe ]
56+
wait: bgp_scan_long
5757
plugin: bgp_prefix(nodes.dut.loopback.ipv4,med=42)
5858

5959
med_v6:
6060
description: Check for MED on DUT IPv6 X1 prefix
61-
wait: 10
6261
nodes: [ probe ]
62+
wait: bgp_scan_long
6363
plugin: bgp_prefix(nodes.dut.loopback.ipv6,af='ipv6',med=42)

tests/integration/bgp.policy/41-prepend.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 AS path prepending. The DUT has prepend its AS
44
once on updates sent to X1 and prepend AS 64999 to updates sent to X2.
55
6+
defaults.sources.extra: [ ../wait_times.yml, ../warnings.yml ]
7+
68
plugin: [ bgp.policy ]
79
module: [ bgp ]
810

@@ -32,24 +34,24 @@ links:
3234
validate:
3335
session:
3436
description: Check EBGP sessions with DUT
35-
wait: 20
37+
wait: ebgp_session
3638
nodes: [ x1, x2 ]
3739
plugin: bgp_neighbor(node.bgp.neighbors,'dut')
3840

3941
prefix:
4042
description: Check for DUT prefix on X1 and X2
41-
wait: 30
43+
wait: bgp_scan_long
4244
nodes: [ x1, x2 ]
4345
plugin: bgp_prefix('10.0.0.1/32')
4446

4547
pfx_x1:
4648
description: Check the DUT prefix AS path on X1
47-
wait: 10
4849
nodes: [ x1 ]
50+
wait: bgp_scan_long
4951
plugin: bgp_prefix('10.0.0.1/32',aspath='65000 65000')
5052

5153
pfx_x2:
5254
description: Check the DUT prefix AS path on X2
53-
wait: 10
5455
nodes: [ x2 ]
56+
wait: bgp_scan_long
5557
plugin: bgp_prefix('10.0.0.1/32',as_elements=[ 64999, 65000 ])

0 commit comments

Comments
 (0)