mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
e2e: enable contextual logging
Contextual logging cannot be enabled manually because there is no feature gate flag. Enabling the feature unconditionally: - should be low risk for E2E testing - if it fails, we want to know - is useful to get better log output from code which already supports it
This commit is contained in:
parent
96e9a93a6b
commit
53d5c6a15b
@ -97,8 +97,18 @@ var _ = ginkgo.SynchronizedAfterSuite(func() {
|
|||||||
// generated in this directory, and cluster logs will also be saved.
|
// generated in this directory, and cluster logs will also be saved.
|
||||||
// This function is called on each Ginkgo node in parallel mode.
|
// This function is called on each Ginkgo node in parallel mode.
|
||||||
func RunE2ETests(t *testing.T) {
|
func RunE2ETests(t *testing.T) {
|
||||||
|
// InitLogs disables contextual logging, without a way to enable it again
|
||||||
|
// in the E2E test suite because it has no feature gates. It used to have a
|
||||||
|
// misleading --feature-gates parameter but that didn't do what users
|
||||||
|
// and developers expected (define which features the cluster supports)
|
||||||
|
// and therefore got removed.
|
||||||
|
//
|
||||||
|
// Because contextual logging is useful and should get tested, it gets
|
||||||
|
// re-enabled here unconditionally.
|
||||||
logs.InitLogs()
|
logs.InitLogs()
|
||||||
defer logs.FlushLogs()
|
defer logs.FlushLogs()
|
||||||
|
klog.EnableContextualLogging(true)
|
||||||
|
|
||||||
progressReporter = e2ereporters.NewProgressReporter(framework.TestContext.ProgressReportURL)
|
progressReporter = e2ereporters.NewProgressReporter(framework.TestContext.ProgressReportURL)
|
||||||
gomega.RegisterFailHandler(framework.Fail)
|
gomega.RegisterFailHandler(framework.Fail)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user