Stop using the deprecated method CurrentGinkgoTestDescription

Besides, the using of method might lead to a `concurrent map writes`
issue per the discussion here: https://github.com/onsi/ginkgo/issues/970

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen
2022-04-24 16:55:25 +08:00
parent 2f3028c00d
commit fd4b5b629b
18 changed files with 40 additions and 34 deletions

View File

@@ -425,7 +425,7 @@ current-context: local-context
})
ginkgo.AfterEach(func() {
if ginkgo.CurrentGinkgoTestDescription().Failed && framework.TestContext.DumpLogsOnFailure {
if ginkgo.CurrentSpecReport().Failed() && framework.TestContext.DumpLogsOnFailure {
ginkgo.By("Get node problem detector log")
log, err := e2epod.GetPodLogs(c, ns, name, name)
gomega.Expect(err).ShouldNot(gomega.HaveOccurred())