static: add support for the metric property
This commit is contained in:
parent
a7dc005b8d
commit
ce07e1ff1f
2 changed files with 19 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
EXECUTOR="$(atf_get_srcdir)/../../executor-scripts/linux/static"
|
||||
FIXTURES="$(atf_get_srcdir)/../fixtures"
|
||||
|
||||
tests_init up down vrf_up vrf_down
|
||||
tests_init up down vrf_up vrf_down metric_up metric_down
|
||||
|
||||
up_body() {
|
||||
export IFACE=eth0 PHASE=up MOCK=echo INTERFACES_FILE="$FIXTURES/static-eth0.interfaces"
|
||||
|
@ -41,3 +41,19 @@ vrf_down_body() {
|
|||
-o match:'route del default via 203.0.113.2 table 1' \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
metric_up_body() {
|
||||
export IFACE=vrf-red PHASE=up MOCK=echo INTERFACES_FILE="$FIXTURES/vrf.interfaces" \
|
||||
IF_VRF_TABLE=1 IF_METRIC=20
|
||||
atf_check -s exit:0 \
|
||||
-o match:'route add default via 203.0.113.2 table 1 metric 20' \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
metric_down_body() {
|
||||
export IFACE=vrf-red PHASE=down MOCK=echo INTERFACES_FILE="$FIXTURES/vrf.interfaces" \
|
||||
IF_VRF_TABLE=1 IF_METRIC=20
|
||||
atf_check -s exit:0 \
|
||||
-o match:'route del default via 203.0.113.2 table 1 metric 20' \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue