From 9e4109bae8baa7d925034db387cc99d22932f374 Mon Sep 17 00:00:00 2001 From: mattmoor-sockpuppet Date: Fri, 27 Sep 2019 07:26:42 -0700 Subject: [PATCH] Auto-update dependencies (#110) Produced via: `dep ensure -update knative.dev/test-infra knative.dev/pkg` /assign mattmoor --- Gopkg.lock | 4 +-- .../test-infra/scripts/e2e-tests.sh | 35 ++++++++++++++----- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 307b1551..186569be 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -950,14 +950,14 @@ [[projects]] branch = "master" - digest = "1:d65a0f4c8458b9720f97b17d6d04c9efe341298f1c3f6c37e124a6c83c716668" + digest = "1:8009d9ea7464198279c5c1b1a760365c1f731aa88239632c08929df5b7f323f6" name = "knative.dev/test-infra" packages = [ "scripts", "tools/dep-collector", ] pruneopts = "UT" - revision = "e253fe07d282bd3d80bd9dd9f439fa550fbb9365" + revision = "5d51ed40c38a606beaa42197961edb6d737227fc" [[projects]] digest = "1:8730e0150dfb2b7e173890c8b9868e7a273082ef8e39f4940e3506a481cf895c" diff --git a/vendor/knative.dev/test-infra/scripts/e2e-tests.sh b/vendor/knative.dev/test-infra/scripts/e2e-tests.sh index 672c84e1..8ba80bbc 100755 --- a/vendor/knative.dev/test-infra/scripts/e2e-tests.sh +++ b/vendor/knative.dev/test-infra/scripts/e2e-tests.sh @@ -93,15 +93,32 @@ function dump_cluster_state() { echo "*** E2E TEST FAILED ***" echo "*** Start of information dump ***" echo "***************************************" - echo ">>> All resources:" - kubectl get all --all-namespaces --show-labels -o wide - echo ">>> Services:" - kubectl get services --all-namespaces --show-labels -o wide - echo ">>> Events:" - kubectl get events --all-namespaces --show-labels -o wide - function_exists dump_extra_cluster_state && dump_extra_cluster_state - echo ">>> Full dump: ${ARTIFACTS}/k8s.dump.txt" - kubectl get all --all-namespaces -o yaml > ${ARTIFACTS}/k8s.dump.txt + + local output="${ARTIFACTS}/k8s.dump.txt" + echo ">>> The dump is located at ${output}" + + for crd in $(kubectl api-resources --verbs=list -o name | sort); do + local count="$(kubectl get $crd --all-namespaces --no-headers 2>/dev/null | wc -l)" + echo ">>> ${crd} (${count} objects)" + if [[ "${count}" > "0" ]]; then + echo ">>> ${crd} (${count} objects)" >> ${output} + + echo ">>> Listing" >> ${output} + kubectl get ${crd} --all-namespaces >> ${output} + + echo ">>> Details" >> ${output} + if [[ "${crd}" == "secrets" ]]; then + echo "Secrets are ignored for security reasons" >> ${output} + else + kubectl get ${crd} --all-namespaces -o yaml >> ${output} + fi + fi + done + + if function_exists dump_extra_cluster_state; then + echo ">>> Extra dump" >> ${output} + dump_extra_cluster_state >> ${output} + fi echo "***************************************" echo "*** E2E TEST FAILED ***" echo "*** End of information dump ***"