X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=deploy%2Fkata%2Fkata.sh;h=0cc3b862fb670e0d03894360911395bf2357208c;hb=860d3ddea953c3f77df35762afc1a282157c846b;hp=ec3ade4af21921f623d549d6e8a2cafa9cc366ac;hpb=ed9305ea85bf6f5e5722e2bfd962c7e6aad5c645;p=icn.git diff --git a/deploy/kata/kata.sh b/deploy/kata/kata.sh index ec3ade4..0cc3b86 100755 --- a/deploy/kata/kata.sh +++ b/deploy/kata/kata.sh @@ -64,12 +64,21 @@ function clean_webhook { kustomize build ${BUILDDIR}/webhook/base | KUBECONFIG=${cluster_kubeconfig} kubectl delete -f - } +function is_kata_deployed { + local -r cluster_name=${CLUSTER_NAME:-icn} + local -r cluster_kubeconfig="${BUILDDIR}/${cluster_name}.conf" + kubectl --kubeconfig=${cluster_kubeconfig} get runtimeclass/kata-qemu +} + function test_kata { # Create a temporary kubeconfig file for the tests - local -r cluster_name=${CLUSTER_NAME:-e2etest} + local -r cluster_name=${CLUSTER_NAME:-icn} local -r cluster_kubeconfig="${BUILDDIR}/${cluster_name}.conf" clusterctl -n metal3 get kubeconfig ${cluster_name} >${cluster_kubeconfig} + # Ensure that Kata has been deployed first + wait_for is_kata_deployed + deploy_webhook ${cluster_name} clone_kud_repository pushd ${KUDPATH}/kud/tests @@ -93,7 +102,7 @@ case $1 in Usage: $(basename $0) COMMAND The "test" command looks for the CLUSTER_NAME variable in the -environment (default: "e2etest"). This should be the name of the +environment (default: "icn"). This should be the name of the Cluster resource to execute the tests in. Commands: