diff --git a/pkg/kubelet/cm/dra/claiminfo_test.go b/pkg/kubelet/cm/dra/claiminfo_test.go index 67f34b5ef62..71d77086278 100644 --- a/pkg/kubelet/cm/dra/claiminfo_test.go +++ b/pkg/kubelet/cm/dra/claiminfo_test.go @@ -34,6 +34,11 @@ import ( "k8s.io/kubernetes/test/utils/ktesting/initoption" ) +// Some of these tests capture log output. Don't reduce the verbosity or they will fail! +func init() { + ktesting.SetDefaultVerbosity(5) +} + // ClaimInfo test cases const ( diff --git a/pkg/kubelet/watchdog/watchdog_linux_test.go b/pkg/kubelet/watchdog/watchdog_linux_test.go index 39ab8dc6508..f45258d1909 100644 --- a/pkg/kubelet/watchdog/watchdog_linux_test.go +++ b/pkg/kubelet/watchdog/watchdog_linux_test.go @@ -29,6 +29,11 @@ import ( "k8s.io/kubernetes/test/utils/ktesting/initoption" ) +// Some of these tests capture log output. Don't reduce the verbosity or they will fail! +func init() { + ktesting.SetDefaultVerbosity(5) +} + // Mock syncLoopHealthChecker type mockSyncLoopHealthChecker struct { healthCheckErr error diff --git a/test/utils/ktesting/ktesting.go b/test/utils/ktesting/ktesting.go index fc15f809759..486a2023360 100644 --- a/test/utils/ktesting/ktesting.go +++ b/test/utils/ktesting/ktesting.go @@ -27,12 +27,6 @@ import ( _ "k8s.io/component-base/logs/testinit" ) -func init() { - // This is a good default for unit tests. Benchmarks should add their own - // init function or TestMain to lower the default, for example to 2. - SetDefaultVerbosity(5) -} - // SetDefaultVerbosity can be called during init to modify the default // log verbosity of the program. //