mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
test: switch gotestsum quiet output format
"--format standard-quiet" shows log output on stderr (= klog logging) if it occurs outside of a test (= test has leaked something). That is inconsistent with "go test" without -v and a problem for pull-kubernetes-unit because many tests do not clean up properly. "pkgname-and-test-fails" hides the extra output and seems similar enough: pkgname-and-test-fails print a line for each package and failed test output $ gotestsum --format pkgname-and-test-fails ./test/internal/logging --count=1 ✓ test/internal/logging (5.007s) DONE 1 tests in 5.384s
This commit is contained in:
parent
6b8e5a9457
commit
2a9a3ea827
@ -139,7 +139,8 @@ testargs=()
|
||||
eval "testargs=(${KUBE_TEST_ARGS:-})"
|
||||
|
||||
# gotestsum --format value
|
||||
gotestsum_format=standard-quiet
|
||||
# "standard-quiet" let's some stderr log messages through, "pkgname-and-test-fails" is similar and doesn't (https://github.com/kubernetes/kubernetes/issues/130934#issuecomment-2739957840).
|
||||
gotestsum_format=pkgname-and-test-fails
|
||||
if [[ -n "${FULL_LOG:-}" ]] ; then
|
||||
gotestsum_format=standard-verbose
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user