test: Skip networking tests if CNI plugins are missing
If the CNI binaries (bridge and host-local) are not installed, we skip the tests. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
4c702fb60c
commit
b97a57c006
2 changed files with 17 additions and 0 deletions
|
@ -46,6 +46,7 @@ fi
|
||||||
OCID_SOCKET="$TESTDIR/ocid.sock"
|
OCID_SOCKET="$TESTDIR/ocid.sock"
|
||||||
OCID_CONFIG="$TESTDIR/ocid.conf"
|
OCID_CONFIG="$TESTDIR/ocid.conf"
|
||||||
OCID_CNI_CONFIG="$TESTDIR/cni/net.d/"
|
OCID_CNI_CONFIG="$TESTDIR/cni/net.d/"
|
||||||
|
OCID_CNI_PLUGIN="/opt/cni/bin/"
|
||||||
POD_CIDR="10.88.0.0/16"
|
POD_CIDR="10.88.0.0/16"
|
||||||
POD_CIDR_MASK="10.88.*.*"
|
POD_CIDR_MASK="10.88.*.*"
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,14 @@ load helpers
|
||||||
skip "cannot yet run this test in a container, use sudo make localintegration"
|
skip "cannot yet run this test in a container, use sudo make localintegration"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$OCID_CNI_PLUGIN/bridge" ]; then
|
||||||
|
skip "missing CNI bridge plugin, please install it"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$OCID_CNI_PLUGIN/host-local" ]; then
|
||||||
|
skip "missing CNI host-local IPAM, please install it"
|
||||||
|
fi
|
||||||
|
|
||||||
prepare_network_conf $POD_CIDR
|
prepare_network_conf $POD_CIDR
|
||||||
|
|
||||||
start_ocid
|
start_ocid
|
||||||
|
@ -29,6 +37,14 @@ load helpers
|
||||||
skip "cannot yet run this test in a container, use sudo make localintegration"
|
skip "cannot yet run this test in a container, use sudo make localintegration"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$OCID_CNI_PLUGIN/bridge" ]; then
|
||||||
|
skip "missing CNI bridge plugin, please install it"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$OCID_CNI_PLUGIN/host-local" ]; then
|
||||||
|
skip "missing CNI host-local IPAM, please install it"
|
||||||
|
fi
|
||||||
|
|
||||||
prepare_network_conf $POD_CIDR
|
prepare_network_conf $POD_CIDR
|
||||||
|
|
||||||
start_ocid
|
start_ocid
|
||||||
|
|
Loading…
Reference in a new issue