Skip to content

Commit bf28d6b

Browse files
author
Damien Nadé
committed
Fixed host type checking
1 parent 154ab55 commit bf28d6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unittest

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ declare -A types=(
269269
[hexa]="0x123abc 71234 abc"
270270
[ipv4]="192.168.40.254 127.0.0.1 1.2.3.4"
271271
[ipv6]="2001:7a8:b018::1 ::1 2001:7a8:b018:0:21f:c6ff:fe59:71fd"
272-
[host]="${types[ipv4]} ${types[ipv6]}"
273272
[username]=$(whoami)
274273
[group]=$(id -gn)
275274
[port]="ssh 80"
@@ -307,6 +306,8 @@ do
307306
fi
308307
done
309308

309+
# Default 'host' type test case:
310+
types[host]="${types[ipv4]} ${types[ipv6]}"
310311
# Test hostnames only if we can actually resolv.
311312
if host localhost >/dev/null 2>&1
312313
then

0 commit comments

Comments
 (0)