tests: ifquery: add tests to verify stanza merging works as expected

This commit is contained in:
Ariadne Conill 2020-12-02 11:42:45 -07:00
parent f671e2d410
commit bcf090f7ad

View file

@ -36,7 +36,9 @@ tests_init \
vlan_complex_learned_dependency \
wireguard \
default_netmask_v4 \
default_netmask_v6
default_netmask_v6 \
stanza_merging_with_cidr \
stanza_merging_without_cidr
noargs_body() {
atf_check -s exit:1 -e ignore ifquery -S/dev/null
@ -240,3 +242,17 @@ default_netmask_v6_body() {
-o match:"2001:470:1f10::1/64" \
ifquery -i $FIXTURES/without-netmask.interfaces -p address v6
}
stanza_merging_with_cidr_body() {
atf_check -s exit:0 \
-o match:"203.0.113.1/32" \
-o match:"203.0.113.2/24" \
ifquery -i $FIXTURES/stanza-merging.interfaces -p address cidr
}
stanza_merging_without_cidr_body() {
atf_check -s exit:0 \
-o match:"203.0.113.1/32" \
-o match:"203.0.113.2/24" \
ifquery -i $FIXTURES/stanza-merging.interfaces -p address without-cidr
}