Fix integration tests to run better on ARM (#5101)

In order for the integration tests to run successfully on a dedicated ARM cluster, two small changes are necessary:

* We need to skip the multicluster test since this test uses two separate clusters (source and target)
* We need to properly uninstall the multicluster helm chart during cleanup.

With these changes, I was able to successfully run the integration tests on a dedicated ARM cluster.

Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
Alex Leong 2020-10-21 09:27:56 -07:00 committed by GitHub
parent 2f8d669890
commit d22dda0917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 4 deletions

View File

@ -263,6 +263,11 @@ start_kind_test() {
} }
start_k3d_test() { start_k3d_test() {
if [ -n "$RUN_ARM_TEST" ]; then
echo "Skipped because ARM tests run on a dedicated cluster."
return
fi
test_setup test_setup
if [ -z "$skip_cluster_create" ]; then if [ -z "$skip_cluster_create" ]; then
create_k3d_cluster source multicluster-test create_k3d_cluster source multicluster-test
@ -390,7 +395,7 @@ run_upgrade-edge_test() {
run_upgrade-stable_test() { run_upgrade-stable_test() {
if [ -n "$RUN_ARM_TEST" ]; then if [ -n "$RUN_ARM_TEST" ]; then
echo "Skipped. Linkerd stable version does not support ARM yet" echo "Skipped. Linkerd stable version does not support ARM yet"
exit 0 return
fi fi
stable_install_url="https://run.linkerd.io/install" stable_install_url="https://run.linkerd.io/install"
@ -411,12 +416,14 @@ setup_helm() {
helm_cleanup() { helm_cleanup() {
( (
set -e set -e
"$helm_path" --kube-context="$context" delete "$helm_release_name" "$helm_path" --kube-context="$context" delete "$helm_release_name" || true
"$helm_path" --kube-context="$context" delete "$helm_multicluster_release_name" || true
# `helm delete` doesn't wait for resources to be deleted, so we wait explicitly. # `helm delete` doesn't wait for resources to be deleted, so we wait explicitly.
# We wait for the namespace to be gone so the following call to `cleanup` doesn't fail when it attempts to delete # We wait for the namespace to be gone so the following call to `cleanup` doesn't fail when it attempts to delete
# the same namespace that is already being deleted here (error thrown by the NamespaceLifecycle controller). # the same namespace that is already being deleted here (error thrown by the NamespaceLifecycle controller).
# We don't have that problem with global resources, so no need to wait for them to be gone. # We don't have that problem with global resources, so no need to wait for them to be gone.
kubectl wait --for=delete ns/linkerd --timeout=120s kubectl wait --for=delete ns/linkerd --timeout=120s || true
kubectl wait --for=delete ns/linkerd-multicluster --timeout=120s || true
) )
exit_on_err 'error cleaning up Helm' exit_on_err 'error cleaning up Helm'
} }
@ -424,7 +431,7 @@ helm_cleanup() {
run_helm-upgrade_test() { run_helm-upgrade_test() {
if [ -n "$RUN_ARM_TEST" ]; then if [ -n "$RUN_ARM_TEST" ]; then
echo "Skipped. Linkerd stable version does not support ARM yet" echo "Skipped. Linkerd stable version does not support ARM yet"
exit 0 return
fi fi
local stable_version local stable_version