From 53b8ef21008bb4b71f900f786306146cda23fb3d Mon Sep 17 00:00:00 2001 From: knative-automation Date: Wed, 17 Mar 2021 22:02:55 -0700 Subject: [PATCH] upgrade to latest dependencies (#440) bumping knative.dev/hack 9b73a25...58edbdc: > 58edbdc [schema cli] correct arrays (# 58) > 97362eb go test flag should go first (# 54) > 57abacd Don't redirect STDERR to /dev/null when querying pods (# 55) Signed-off-by: Knative Automation --- go.mod | 2 +- go.sum | 2 ++ vendor/knative.dev/hack/e2e-tests.sh | 11 +++++++---- vendor/knative.dev/hack/library.sh | 2 +- vendor/knative.dev/hack/presubmit-tests.sh | 2 +- vendor/modules.txt | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 91db561a..f887e5c6 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,6 @@ require ( k8s.io/client-go v0.19.7 k8s.io/code-generator v0.19.7 k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 - knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a + knative.dev/hack v0.0.0-20210317214554-58edbdc42966 knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac ) diff --git a/go.sum b/go.sum index b5b44371..a828e29e 100644 --- a/go.sum +++ b/go.sum @@ -1194,6 +1194,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a h1:0UGKyvFzY1Czu0lP9+0IrJhwtKe2oNLI2GYa7MIQ5c0= knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= +knative.dev/hack v0.0.0-20210317214554-58edbdc42966 h1:qSnMQkq4gnhD5Hb8Mpfn7IrpkiQFhXXFPOA7uIl2lAc= +knative.dev/hack v0.0.0-20210317214554-58edbdc42966/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac h1:aGbaOcyNqxnvvujRtSMfkwehPER3TTsAw5mgCVqYZ08= knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac/go.mod h1:7swdJzGy7U6iq8538vt2yFsZJqmnSAxMFexWK9Ktyes= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= diff --git a/vendor/knative.dev/hack/e2e-tests.sh b/vendor/knative.dev/hack/e2e-tests.sh index 0b8548f6..c5906d61 100644 --- a/vendor/knative.dev/hack/e2e-tests.sh +++ b/vendor/knative.dev/hack/e2e-tests.sh @@ -37,12 +37,15 @@ function teardown_test_resources() { # Parameters: $1..$n - any go test flags, then directories containing the tests to run. function go_test_e2e() { local go_test_args=() + [[ ! " $*" == *" -tags="* ]] && go_test_args+=("-tags=e2e") + [[ ! " $*" == *" -count="* ]] && go_test_args+=("-count=1") + [[ ! " $*" == *" -race"* ]] && go_test_args+=("-race") + # Remove empty args as `go test` will consider it as running tests for the current directory, which is not expected. for arg in "$@"; do [[ -n "$arg" ]] && go_test_args+=("$arg") done - [[ ! " $*" == *" -tags="* ]] && go_test_args+=("-tags=e2e") - report_go_test -race -count=1 "${go_test_args[@]}" + report_go_test "${go_test_args[@]}" } # Setup the test cluster for running the tests. @@ -69,8 +72,8 @@ function setup_test_cluster() { # Acquire cluster admin role for the current user. acquire_cluster_admin_role "${k8s_cluster}" - # Setup KO_DOCKER_REPO if it is a GKE cluster. Incorporate an element of - # randomness to ensure that each run properly publishes images. Don't + # Setup KO_DOCKER_REPO if it is a GKE cluster. Incorporate an element of + # randomness to ensure that each run properly publishes images. Don't # owerwrite KO_DOCKER_REPO if already set. [ -z "${KO_DOCKER_REPO}" ] && \ [[ "${k8s_cluster}" =~ ^gke_.* ]] && \ diff --git a/vendor/knative.dev/hack/library.sh b/vendor/knative.dev/hack/library.sh index f8f8b629..d72bfe6b 100644 --- a/vendor/knative.dev/hack/library.sh +++ b/vendor/knative.dev/hack/library.sh @@ -163,7 +163,7 @@ function wait_until_pods_running() { for i in {1..150}; do # timeout after 5 minutes # List all pods. Ignore Terminating pods as those have either been replaced through # a deployment or terminated on purpose (through chaosduck for example). - local pods="$(kubectl get pods --no-headers -n $1 2>/dev/null | grep -v Terminating)" + local pods="$(kubectl get pods --no-headers -n $1 | grep -v Terminating)" # All pods must be running (ignore ImagePull error to allow the pod to retry) local not_running_pods=$(echo "${pods}" | grep -v Running | grep -v Completed | grep -v ErrImagePull | grep -v ImagePullBackOff) if [[ -n "${pods}" ]] && [[ -z "${not_running_pods}" ]]; then diff --git a/vendor/knative.dev/hack/presubmit-tests.sh b/vendor/knative.dev/hack/presubmit-tests.sh index e873736b..fb50ac81 100644 --- a/vendor/knative.dev/hack/presubmit-tests.sh +++ b/vendor/knative.dev/hack/presubmit-tests.sh @@ -209,7 +209,7 @@ function run_unit_tests() { # Default unit test runner that runs all go tests in the repo. function default_unit_test_runner() { - report_go_test -race ./... + report_go_test -race -count 1 ./... } # Run integration tests. If there's no `integration_tests` function, run the diff --git a/vendor/modules.txt b/vendor/modules.txt index e507272a..a3f4dd19 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -656,7 +656,7 @@ k8s.io/kube-openapi/pkg/util/sets k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/trace -# knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a +# knative.dev/hack v0.0.0-20210317214554-58edbdc42966 ## explicit knative.dev/hack # knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac