static executor: Add support for IPv4 'pointopoint' addresses.
Closes #96 Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
parent
cc06712611
commit
67163c6561
4 changed files with 40 additions and 4 deletions
|
@ -4,7 +4,14 @@
|
|||
EXECUTOR="$(atf_get_srcdir)/../../executor-scripts/linux/static"
|
||||
FIXTURES="$(atf_get_srcdir)/../fixtures"
|
||||
|
||||
tests_init up down vrf_up vrf_down metric_up metric_down
|
||||
tests_init \
|
||||
up \
|
||||
up_ptp \
|
||||
down \
|
||||
vrf_up \
|
||||
vrf_down \
|
||||
metric_up \
|
||||
metric_down
|
||||
|
||||
up_body() {
|
||||
export IFACE=eth0 PHASE=up MOCK=echo INTERFACES_FILE="$FIXTURES/static-eth0.interfaces"
|
||||
|
@ -16,6 +23,17 @@ up_body() {
|
|||
${EXECUTOR}
|
||||
}
|
||||
|
||||
up_ptp_body() {
|
||||
export IFACE=eth0 PHASE=up MOCK=echo INTERFACES_FILE="$FIXTURES/static-eth0-ptp.interfaces" \
|
||||
IF_POINTOPOINT="192.0.2.1"
|
||||
atf_check -s exit:0 \
|
||||
-o match:'addr add 203.0.113.2/32 peer 192.0.2.1 dev eth0' \
|
||||
-o match:'route add default via 192.0.2.1 metric 1 dev eth0' \
|
||||
-o match:'addr add 2001:db8:1000:2::2/64 dev eth0' \
|
||||
-o match:'route add default via 2001:db8:1000:2::1 metric 1 dev eth0' \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
down_body() {
|
||||
export IFACE=eth0 PHASE=down MOCK=echo INTERFACES_FILE="$FIXTURES/static-eth0.interfaces"
|
||||
atf_check -s exit:0 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue