Skip to content

Commit

Permalink
tests: Support running on IPv6 networks
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
stgraber committed Mar 22, 2017
1 parent cef0cc9 commit 45997a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tests/lxc-test-ubuntu
Expand Up @@ -61,7 +61,12 @@ for template in ubuntu ubuntu-cloud; do
done
[ -n "$lxcip" ] || FAIL "to start networking in $template container"

ping -c 1 $lxcip || FAIL "to ping $template container"
if echo "${lxcip}" | grep -q ":"; then
ping6 -c 1 $lxcip || FAIL "to ping $template container"
else
ping -c 1 $lxcip || FAIL "to ping $template container"
fi

# Check apparmor
lxcpid=`lxc-info -n $name -p -H`
aa=`cat /proc/$lxcpid/attr/current`
Expand Down

0 comments on commit 45997a7

Please sign in to comment.