From 73b60ba7699877893e81fd0d1de34051d28ca6b9 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 2 Nov 2022 18:07:47 +0100 Subject: [PATCH] e2e framework: don't fail when DumpAllNamespaceInfo is nil It is set in all of the test/e2e* suites, but not in the ginkgo output tests. This check is needed before adding a test case there which would trigger this nil pointer access. --- test/e2e/framework/framework.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 3f64ab39129..ddbbcb195c4 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -268,6 +268,9 @@ func (f *Framework) dumpNamespaceInfo() { if !TestContext.DumpLogsOnFailure { return } + if f.DumpAllNamespaceInfo == nil { + return + } ginkgo.By("dump namespace information after failure", func() { if !f.SkipNamespaceCreation { for _, ns := range f.namespacesToDelete {