From 009841ee53549cf478bcca813783583da47ecfff Mon Sep 17 00:00:00 2001 From: Danail Branekov Date: Mon, 17 Jul 2023 09:58:48 +0000 Subject: [PATCH] Fix line number reporting on an e2e test failure Our fail handler wrapper was not skipping enough stack frames Co-authored-by: Kieron Browne --- tests/e2e/helpers/fail_handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/helpers/fail_handler.go b/tests/e2e/helpers/fail_handler.go index 1e090c643..24b0687fd 100644 --- a/tests/e2e/helpers/fail_handler.go +++ b/tests/e2e/helpers/fail_handler.go @@ -32,9 +32,9 @@ func E2EFailHandler(correlationId func() string) func(string, ...int) { fmt.Fprintf(ginkgo.GinkgoWriter, "Fail Handler: failure correlation ID: %q\n", correlationId()) if len(callerSkip) > 0 { - callerSkip[0] = callerSkip[0] + 1 + callerSkip[0] = callerSkip[0] + 2 } else { - callerSkip = []int{1} + callerSkip = []int{2} } defer func() {