Skip to content

Commit 21ae2fc

Browse files
committed
fix block-external-dns tests
1 parent 24944b0 commit 21ae2fc

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/tests/conf_options/container.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ CONFIG_REQUIRED_DEFAULT_ROUTE="^route 192.168.254.0 255.255.255.0"
5656
CONFIG_MATCH_DEFAULT_ROUTE=$(busybox grep 'route 192.168.254.0 255.255.255.0' /etc/openvpn/openvpn.conf)
5757

5858
# 9. Should see a push of 'block-outside-dns' by default
59-
CONFIG_REQUIRED_DEFAULT_ROUTE="^push block-outside-dns"
60-
CONFIG_MATCH_DEFAULT_ROUTE=$(busybox grep 'push block-outside-dns' /etc/openvpn/openvpn.conf)
59+
CONFIG_REQUIRED_BLOCK_OUTSIDE_DNS="^push block-outside-dns"
60+
CONFIG_MATCH_BLOCK_OUTSIDE_DNS=$(busybox grep 'push block-outside-dns' /etc/openvpn/openvpn.conf)
6161

6262
# 10. Should see a push of 'dhcp-option DNS' by default
6363
CONFIG_REQUIRED_DEFAULT_DNS_1="^push dhcp-option DNS 8.8.8.8"
@@ -127,6 +127,13 @@ else
127127
abort "==> Config match not found: $CONFIG_REQUIRED_DEFAULT_ROUTE != $CONFIG_MATCH_DEFAULT_ROUTE"
128128
fi
129129

130+
if [[ $CONFIG_MATCH_BLOCK_OUTSIDE_DNS =~ $CONFIG_REQUIRED_BLOCK_OUTSIDE_DNS ]]
131+
then
132+
echo "==> Config match found: $CONFIG_REQUIRED_BLOCK_OUTSIDE_DNS == $CONFIG_MATCH_BLOCK_OUTSIDE_DNS"
133+
else
134+
abort "==> Config match not found: $CONFIG_REQUIRED_BLOCK_OUTSIDE_DNS != $CONFIG_MATCH_BLOCK_OUTSIDE_DNS"
135+
fi
136+
130137
if [[ $CONFIG_MATCH_DEFAULT_DNS_1 =~ $CONFIG_REQUIRED_DEFAULT_DNS_1 ]]
131138
then
132139
echo "==> Config match found: $CONFIG_REQUIRED_DEFAULT_DNS_1 == $CONFIG_MATCH_DEFAULT_DNS_1"

0 commit comments

Comments
 (0)