Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2a9a3ea

Browse files
committedMar 20, 2025
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
1 parent 6b8e5a9 commit 2a9a3ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎hack/make-rules/test.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ testargs=()
139139
eval "testargs=(${KUBE_TEST_ARGS:-})"
140140

141141
# gotestsum --format value
142-
gotestsum_format=standard-quiet
142+
# "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).
143+
gotestsum_format=pkgname-and-test-fails
143144
if [[ -n "${FULL_LOG:-}" ]] ; then
144145
gotestsum_format=standard-verbose
145146
fi

0 commit comments

Comments
 (0)
Please sign in to comment.