Reenable disabled integration tests (#5861)

Reenabled the `upgrade-test` and `cni-calico-deep` tracing integration tests. The former was disabled because in edge-21.2.4 the viz install wasn't waiting for the core components to be ready, and the latter was disabled because the `jaeger-webhook` image couldn't be loaded.

The reason simply was disk pressure, as evidenced by the k8s events. The fix consisted on adding a `--cleanup-docker` option to `bin/tests` which deletes the `image-archives` dir and the docker cache after the images have been loaded into k3d. That option is enacted only in the `integration_tests.yml` workflow in the deep tests, which are the ones pulling the most images.

The `release.yml` workflow doesn't require it since it pulls the images directly from the public registry.
This commit is contained in:
Alejandro Pedraza 2021-03-08 10:57:04 -05:00 committed by GitHub
parent 439adc7ce2
commit 04e51c765d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 5 deletions

View File

@ -106,7 +106,7 @@ jobs:
- helm-upgrade
- multicluster
- uninstall
#- upgrade-edge
- upgrade-edge
- upgrade-stable
- cni-calico-deep
needs: [docker_build]
@ -148,5 +148,11 @@ jobs:
# Validate the CLI version matches the current build tag.
[[ "$TAG" == "$($HOME/.linkerd version --short --client)" ]]
- name: Run integration tests
if: ${{ !endsWith(matrix.integration_test, 'deep') }}
run: |
bin/tests --images archive --name ${{ matrix.integration_test }} "$HOME/.linkerd"
- name: Run integration tests (deep)
if: ${{ endsWith(matrix.integration_test, 'deep') }}
run: |
# deep tests consume a lot of disk
bin/tests --images archive --cleanup-docker --name ${{ matrix.integration_test }} "$HOME/.linkerd"

View File

@ -105,7 +105,7 @@ jobs:
- helm-deep
- helm-upgrade
- uninstall
#- upgrade-edge
- upgrade-edge
- upgrade-stable
- cni-calico-deep
needs: [docker_build]

View File

@ -38,7 +38,8 @@ Available Commands:
--name: the argument to this option is the specific test to run
--skip-cluster-create: skip k3d cluster creation step and run tests in an existing cluster
--skip-cluster-delete: if the tests succeed, don't delete the created resources nor the cluster
--images: by default load images into the cluster from the local docker cache (docker), or from tar files located under the 'image-archives' directory (archive), or completely skip image loading (skip)"
--images: by default load images into the cluster from the local docker cache (docker), or from tar files located under the 'image-archives' directory (archive), or completely skip image loading (skip)
--cleanup-docker: delete the 'images-archive' directory and prune the docker cache"
}
cleanup_usage() {
@ -61,6 +62,7 @@ handle_tests_input() {
export test_name=''
export skip_cluster_create=''
export skip_cluster_delete=''
export cleanup_docker=''
export linkerd_path=""
while [ "$#" -ne 0 ]; do
@ -102,6 +104,10 @@ handle_tests_input() {
skip_cluster_delete=1
shift
;;
--cleanup-docker)
cleanup_docker=1
shift
;;
*)
if echo "$1" | grep -q '^-.*' ; then
echo "Unexpected flag: $1" >&2
@ -230,6 +236,10 @@ setup_cluster() {
if [ -z "$skip_cluster_create" ]; then
create_cluster "$@"
image_load "$name"
if [ -n "$cleanup_docker" ]; then
rm -rf image-archives
docker system prune --force --all
fi
fi
check_cluster
}

View File

@ -42,8 +42,6 @@ func TestMain(m *testing.M) {
//////////////////////
func TestTracing(t *testing.T) {
t.Skip(`Temporarily skipped while we figure why it keeps on failing, only in CI ¯\_(ツ)_/¯`)
ctx := context.Background()
if os.Getenv("RUN_ARM_TEST") != "" {
t.Skip("Skipped. Jaeger & Open Census images does not support ARM yet")