tests: Install CNI configuration files by default

Since we no longer fall back to the noop plugin when
CNI configuration files are missing, and since the default
sandbox_config.json test file is running without host
networking, we must install the bridge and loopback
configuration files by default for tests to pass.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz 2017-04-06 23:57:27 +02:00
parent 63c7a7c99b
commit 07ccda3395
3 changed files with 19 additions and 35 deletions

View file

@ -3,16 +3,6 @@
load helpers
@test "Check for valid pod netns CIDR" {
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
run ocic pod run --config "$TESTDATA"/sandbox_config.json
echo "$output"
@ -22,21 +12,10 @@ load helpers
check_pod_cidr $pod_id
cleanup_pods
cleanup_network_conf
stop_ocid
}
@test "Ping pod from the host" {
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
run ocic pod run --config "$TESTDATA"/sandbox_config.json
echo "$output"
@ -46,21 +25,10 @@ load helpers
ping_pod $pod_id
cleanup_pods
cleanup_network_conf
stop_ocid
}
@test "Ping pod from another pod" {
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
run ocic pod run --config "$TESTDATA"/sandbox_config.json
echo "$output"
@ -81,6 +49,5 @@ load helpers
[ "$status" -eq 0 ]
cleanup_pods
cleanup_network_conf
stop_ocid
}