diff --git a/test/helpers.bash b/test/helpers.bash index be4b29bb..c58cc255 100644 --- a/test/helpers.bash +++ b/test/helpers.bash @@ -46,6 +46,7 @@ fi OCID_SOCKET="$TESTDIR/ocid.sock" OCID_CONFIG="$TESTDIR/ocid.conf" OCID_CNI_CONFIG="$TESTDIR/cni/net.d/" +OCID_CNI_PLUGIN="/opt/cni/bin/" POD_CIDR="10.88.0.0/16" POD_CIDR_MASK="10.88.*.*" diff --git a/test/network.bats b/test/network.bats index c2bd5961..0273a44a 100644 --- a/test/network.bats +++ b/test/network.bats @@ -8,6 +8,14 @@ load helpers skip "cannot yet run this test in a container, use sudo make localintegration" 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 start_ocid @@ -29,6 +37,14 @@ load helpers skip "cannot yet run this test in a container, use sudo make localintegration" 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 start_ocid