Skip to content

Commit

Permalink
Remove [It] prefix for E2E_FOCUS
Browse files Browse the repository at this point in the history
Currently the `--rerun-failed` flag doesn't work with the `[It]` prefix
included in the test name

Fixes: #1925

Signed-off-by: James Tumber <[email protected]>
  • Loading branch information
tumberino committed Sep 28, 2023
1 parent 1efd8d7 commit 36170e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/sonobuoy/app/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ func walkForSummary(result *results.Item, statusCounts map[string]int, failList
statusCounts[result.Status]++

if result.Status == results.StatusFailed || result.Status == results.StatusTimeout {
failList = append(failList, result.Name)
// Ginkgo prefixes [It] to the test results name in the junit.xml (ginkgo/#1277)
// The -focus flag does not match test names with [It] flag, we must manually strip it
failList = append(failList, strings.TrimPrefix(result.Name, "[It]"))
}

return statusCounts, failList
Expand Down

0 comments on commit 36170e8

Please sign in to comment.