Merge "Update EMCO to v21.12"
[icn.git] / deploy / addons / addons.sh
index 75a8ad3..9f27982 100755 (executable)
@@ -10,6 +10,10 @@ source $LIBDIR/common.sh
 BUILDDIR=${SCRIPTDIR/deploy/build}
 mkdir -p ${BUILDDIR}
 
+function install_deps {
+    apt-get install -y jq
+}
+
 function is_emco_ready {
     local -r cluster_name=${CLUSTER_NAME:-icn}
     local -r cluster_kubeconfig="${BUILDDIR}/${cluster_name}.conf"
@@ -85,12 +89,20 @@ function is_addon_ready {
 }
 
 function test_addons {
+    install_deps
+
     # Create a temporary kubeconfig file for the tests
     local -r cluster_name=${CLUSTER_NAME:-icn}
     local -r cluster_kubeconfig="${BUILDDIR}/${cluster_name}.conf"
     clusterctl -n metal3 get kubeconfig ${cluster_name} >${cluster_kubeconfig}
 
     clone_kud_repository
+    # The vFW test in EMCO v21.12 does not use KubeVirt, so patch the
+    # KuD test and continue to use it
+    pushd ${KUDPATH}
+    patch -p1 --forward <${SCRIPTDIR}/plugin_fw_v2.patch || true
+    popd
+
     pushd ${KUDPATH}/kud/tests
     failed_kud_tests=""
     container_runtime=$(KUBECONFIG=${cluster_kubeconfig} kubectl get nodes -o jsonpath='{.items[].status.nodeInfo.containerRuntimeVersion}')