mirror of
https://github.com/bgp/bgpq4
synced 2025-02-28 08:53:11 +00:00
Add github workflow for basic unit tests (#87)
Add github workflow for basic unit tests authored-by: James Bensley <jwbensley@gmail.com>
This commit is contained in:
3
tests/reference/as-as112-apnic-notation.txt
Normal file
3
tests/reference/as-as112-apnic-notation.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
no ip prefix-list NN
|
||||
! generated prefix-list NN is empty
|
||||
ip prefix-list NN deny 0.0.0.0/0
|
||||
3
tests/reference/as-as112-ripe-notation.txt
Normal file
3
tests/reference/as-as112-ripe-notation.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
no ip prefix-list NN
|
||||
ip prefix-list NN permit 192.31.196.0/24
|
||||
ip prefix-list NN permit 192.175.48.0/24
|
||||
3
tests/reference/as112-apnic.txt
Normal file
3
tests/reference/as112-apnic.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
no ip prefix-list NN
|
||||
! generated prefix-list NN is empty
|
||||
ip prefix-list NN deny 0.0.0.0/0
|
||||
3
tests/reference/as112-ripe-nonauth.txt
Normal file
3
tests/reference/as112-ripe-nonauth.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
no ip prefix-list NN
|
||||
ip prefix-list NN permit 192.31.196.0/24
|
||||
ip prefix-list NN permit 192.175.48.0/24
|
||||
4
tests/reference/bird--4.txt
Normal file
4
tests/reference/bird--4.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
NN = [
|
||||
192.31.196.0/24,
|
||||
192.175.48.0/24
|
||||
];
|
||||
4
tests/reference/bird--6.txt
Normal file
4
tests/reference/bird--6.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
NN = [
|
||||
2001:4:112::/48,
|
||||
2620:4f:8000::/48
|
||||
];
|
||||
3
tests/reference/bird--asp.txt
Normal file
3
tests/reference/bird--asp.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
NN = [
|
||||
112
|
||||
];
|
||||
4
tests/reference/eos--4.txt
Normal file
4
tests/reference/eos--4.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
no ip prefix-list NN
|
||||
ip prefix-list NN
|
||||
seq 1 permit 192.31.196.0/24
|
||||
seq 2 permit 192.175.48.0/24
|
||||
4
tests/reference/eos--6.txt
Normal file
4
tests/reference/eos--6.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
no ipv6 prefix-list NN
|
||||
ipv6 prefix-list NN
|
||||
seq 1 permit 2001:4:112::/48
|
||||
seq 2 permit 2620:4f:8000::/48
|
||||
1
tests/reference/formated--4.txt
Normal file
1
tests/reference/formated--4.txt
Normal file
@@ -0,0 +1 @@
|
||||
192.31.196.0/24 192.175.48.0/24
|
||||
1
tests/reference/formated--6.txt
Normal file
1
tests/reference/formated--6.txt
Normal file
@@ -0,0 +1 @@
|
||||
2001:4:112::/48 2620:4f:8000::/48
|
||||
3
tests/reference/huawei--4.txt
Normal file
3
tests/reference/huawei--4.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
undo ip ip-prefix NN
|
||||
ip ip-prefix NN permit 192.31.196.0 24
|
||||
ip ip-prefix NN permit 192.175.48.0 24
|
||||
3
tests/reference/huawei--6.txt
Normal file
3
tests/reference/huawei--6.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
undo ip ipv6-prefix NN
|
||||
ip ipv6-prefix NN permit 2001:4:112:: 48
|
||||
ip ipv6-prefix NN permit 2620:4f:8000:: 48
|
||||
2
tests/reference/huawei--asp.txt
Normal file
2
tests/reference/huawei--asp.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
undo ip as-path-filter NN
|
||||
ip as-path-filter NN permit ^112(_112)*$
|
||||
5
tests/reference/huawei-xpl--4.txt
Normal file
5
tests/reference/huawei-xpl--4.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
no xpl ip-prefix-list NN
|
||||
xpl ip-prefix-list NN
|
||||
192.31.196.0 24,
|
||||
192.175.48.0 24
|
||||
end-list
|
||||
5
tests/reference/huawei-xpl--6.txt
Normal file
5
tests/reference/huawei-xpl--6.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
no xpl ipv6-prefix-list NN
|
||||
xpl ipv6-prefix-list NN
|
||||
2001:4:112:: 48,
|
||||
2620:4f:8000:: 48
|
||||
end-list
|
||||
3
tests/reference/huawei-xpl--asp.txt
Normal file
3
tests/reference/huawei-xpl--asp.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
xpl as-path-list NN
|
||||
regular ^112(_112)*$
|
||||
end-list
|
||||
3
tests/reference/ios--4.txt
Normal file
3
tests/reference/ios--4.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
no ip prefix-list NN
|
||||
ip prefix-list NN permit 192.31.196.0/24
|
||||
ip prefix-list NN permit 192.175.48.0/24
|
||||
3
tests/reference/ios--6.txt
Normal file
3
tests/reference/ios--6.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
no ipv6 prefix-list NN
|
||||
ipv6 prefix-list NN permit 2001:4:112::/48
|
||||
ipv6 prefix-list NN permit 2620:4f:8000::/48
|
||||
2
tests/reference/ios--asp.txt
Normal file
2
tests/reference/ios--asp.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
no ip as-path access-list NN
|
||||
ip as-path access-list NN permit ^112(_112)*$
|
||||
5
tests/reference/ios-xr--4.txt
Normal file
5
tests/reference/ios-xr--4.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
no prefix-set NN
|
||||
prefix-set NN
|
||||
192.31.196.0/24,
|
||||
192.175.48.0/24
|
||||
end-set
|
||||
5
tests/reference/ios-xr--6.txt
Normal file
5
tests/reference/ios-xr--6.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
no prefix-set NN
|
||||
prefix-set NN
|
||||
2001:4:112::/48,
|
||||
2620:4f:8000::/48
|
||||
end-set
|
||||
3
tests/reference/ios-xr--asp.txt
Normal file
3
tests/reference/ios-xr--asp.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
as-path-set NN
|
||||
ios-regex '^112(_112)*$'
|
||||
end-set
|
||||
4
tests/reference/json--4.txt
Normal file
4
tests/reference/json--4.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
{ "NN": [
|
||||
{ "prefix": "192.31.196.0\/24", "exact": true },
|
||||
{ "prefix": "192.175.48.0\/24", "exact": true }
|
||||
] }
|
||||
4
tests/reference/json--6.txt
Normal file
4
tests/reference/json--6.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
{ "NN": [
|
||||
{ "prefix": "2001:4:112::\/48", "exact": true },
|
||||
{ "prefix": "2620:4f:8000::\/48", "exact": true }
|
||||
] }
|
||||
3
tests/reference/json--asp.txt
Normal file
3
tests/reference/json--asp.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
{"NN": [
|
||||
112
|
||||
]}
|
||||
7
tests/reference/junos--4.txt
Normal file
7
tests/reference/junos--4.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
policy-options {
|
||||
replace:
|
||||
prefix-list NN {
|
||||
192.31.196.0/24;
|
||||
192.175.48.0/24;
|
||||
}
|
||||
}
|
||||
7
tests/reference/junos--6.txt
Normal file
7
tests/reference/junos--6.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
policy-options {
|
||||
replace:
|
||||
prefix-list NN {
|
||||
2001:4:112::/48;
|
||||
2620:4f:8000::/48;
|
||||
}
|
||||
}
|
||||
6
tests/reference/junos--asp.txt
Normal file
6
tests/reference/junos--asp.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
policy-options {
|
||||
replace:
|
||||
as-path-group NN {
|
||||
as-path a0 "^112(112)*$";
|
||||
}
|
||||
}
|
||||
4
tests/reference/openbgpd--4.txt
Normal file
4
tests/reference/openbgpd--4.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
prefix {
|
||||
192.31.196.0/24
|
||||
192.175.48.0/24
|
||||
}
|
||||
4
tests/reference/openbgpd--6.txt
Normal file
4
tests/reference/openbgpd--6.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
prefix {
|
||||
2001:4:112::/48
|
||||
2620:4f:8000::/48
|
||||
}
|
||||
1
tests/reference/openbgpd--asp.txt
Normal file
1
tests/reference/openbgpd--asp.txt
Normal file
@@ -0,0 +1 @@
|
||||
allow from AS 112 AS 112
|
||||
2
tests/reference/routeros6--4.txt
Normal file
2
tests/reference/routeros6--4.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
/routing filter add action=accept chain="NN-V4" prefix=192.31.196.0/24
|
||||
/routing filter add action=accept chain="NN-V4" prefix=192.175.48.0/24
|
||||
2
tests/reference/routeros6--6.txt
Normal file
2
tests/reference/routeros6--6.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
/routing filter add action=accept chain="NN-V6" prefix=2001:4:112::/48
|
||||
/routing filter add action=accept chain="NN-V6" prefix=2620:4f:8000::/48
|
||||
2
tests/reference/routeros7--4.txt
Normal file
2
tests/reference/routeros7--4.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
/routing filter rule add chain="NN-V4" rule="if (dst=192.31.196.0/24) {accept}"
|
||||
/routing filter rule add chain="NN-V4" rule="if (dst=192.175.48.0/24) {accept}"
|
||||
2
tests/reference/routeros7--6.txt
Normal file
2
tests/reference/routeros7--6.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
/routing filter rule add chain="NN-V6" rule="if (dst=2001:4:112::/48) {accept}"
|
||||
/routing filter rule add chain="NN-V6" rule="if (dst=2620:4f:8000::/48) {accept}"
|
||||
8
tests/reference/sros--4.txt
Normal file
8
tests/reference/sros--4.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
configure router policy-options
|
||||
begin
|
||||
no prefix-list "NN"
|
||||
prefix-list "NN"
|
||||
prefix 192.31.196.0/24 exact
|
||||
prefix 192.175.48.0/24 exact
|
||||
exit
|
||||
commit
|
||||
8
tests/reference/sros--6.txt
Normal file
8
tests/reference/sros--6.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
configure router policy-options
|
||||
begin
|
||||
no prefix-list "NN"
|
||||
prefix-list "NN"
|
||||
prefix 2001:4:112::/48 exact
|
||||
prefix 2620:4f:8000::/48 exact
|
||||
exit
|
||||
commit
|
||||
7
tests/reference/sros--asp.txt
Normal file
7
tests/reference/sros--asp.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
configure router policy-options
|
||||
begin
|
||||
no as-path-group "NN"
|
||||
as-path-group "NN"
|
||||
entry 1 expression "112+"
|
||||
exit
|
||||
commit
|
||||
8
tests/reference/sros-mdcli--4.txt
Normal file
8
tests/reference/sros-mdcli--4.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
/configure policy-options
|
||||
delete prefix-list "NN"
|
||||
prefix-list "NN" {
|
||||
prefix 192.31.196.0/24 type exact {
|
||||
}
|
||||
prefix 192.175.48.0/24 type exact {
|
||||
}
|
||||
}
|
||||
8
tests/reference/sros-mdcli--6.txt
Normal file
8
tests/reference/sros-mdcli--6.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
/configure policy-options
|
||||
delete prefix-list "NN"
|
||||
prefix-list "NN" {
|
||||
prefix 2001:4:112::/48 type exact {
|
||||
}
|
||||
prefix 2620:4f:8000::/48 type exact {
|
||||
}
|
||||
}
|
||||
7
tests/reference/sros-mdcli--asp.txt
Normal file
7
tests/reference/sros-mdcli--asp.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
/configure policy-options
|
||||
delete as-path-group "NN"
|
||||
as-path-group "NN" {
|
||||
entry 1 {
|
||||
expression "112+"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user