Skip to content

Commit

Permalink
Make sure we use the same test name for reruns (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
adjackura authored Apr 16, 2021
1 parent ebdf637 commit 59971ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion e2e_tests/test_suites/guestpolicies/guest_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"log"
"path"
"regexp"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -214,7 +215,7 @@ func packageManagementTestCase(ctx context.Context, testSetup *guestPolicyTestSe
logger.Printf("Running TestCase %q", tc.Name)
runTest(ctx, tc, testSetup, logger)
if tc.Failure != nil {
rerunTC := junitxml.NewTestCase(testSuiteName, tc.Name)
rerunTC := junitxml.NewTestCase(testSuiteName, strings.TrimPrefix(tc.Name, fmt.Sprintf("[%s] ", testSuiteName)))
wg.Add(1)
go func() {
defer wg.Done()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"log"
"path"
"regexp"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -167,7 +168,7 @@ func inventoryReportingTestCase(ctx context.Context, testSetup *inventoryTestSet
logger.Printf("Running TestCase %q", inventoryTest.Name)
runInventoryReportingTest(ctx, testSetup, inventoryTest)
if inventoryTest.Failure != nil {
rerunTC := junitxml.NewTestCase(testSuiteName, inventoryTest.Name)
rerunTC := junitxml.NewTestCase(testSuiteName, strings.TrimPrefix(inventoryTest.Name, fmt.Sprintf("[%s] ", testSuiteName)))
wg.Add(1)
go func() {
defer wg.Done()
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/test_suites/ospolicies/ospolicies.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func testCase(ctx context.Context, testSetup *osPolicyTestSetup, tests chan *jun
logger.Printf("Running TestCase %q", tc.Name)
runTest(ctx, tc, testSetup, logger)
if tc.Failure != nil {
rerunTC := junitxml.NewTestCase(testSuiteName, tc.Name)
rerunTC := junitxml.NewTestCase(testSuiteName, strings.TrimPrefix(tc.Name, fmt.Sprintf("[%s] ", testSuiteName)))
wg.Add(1)
go func() {
defer wg.Done()
Expand Down

0 comments on commit 59971ea

Please sign in to comment.