test: Add host pod ping test
We create a pod with host networking and we try to ping it from the host. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
5273bef5d2
commit
b6455253c2
3 changed files with 102 additions and 0 deletions
|
@ -245,6 +245,14 @@ function parse_pod_ip() {
|
|||
done
|
||||
}
|
||||
|
||||
function ping_host_pod() {
|
||||
pod_ip=`ocic pod status --id $1 | grep "IP Address" | cut -d ' ' -f 3`
|
||||
|
||||
ping -W 1 -c 5 $pod_ip
|
||||
|
||||
echo $?
|
||||
}
|
||||
|
||||
function ping_pod() {
|
||||
netns=`ocic pod status --id $1 | grep namespace | cut -d ' ' -f 3`
|
||||
inet=`ip netns exec \`basename $netns\` ip addr show dev eth0 scope global | grep inet`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue