File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,15 @@ package e2e
3
3
import (
4
4
"context"
5
5
"flag"
6
+ "fmt"
6
7
"os"
8
+ "path"
7
9
"testing"
8
10
"time"
9
11
10
12
. "github.com/onsi/ginkgo"
13
+ "github.com/onsi/ginkgo/config"
14
+ "github.com/onsi/ginkgo/reporters"
11
15
. "github.com/onsi/gomega"
12
16
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13
17
@@ -44,7 +48,13 @@ func TestEndToEnd(t *testing.T) {
44
48
RegisterFailHandler (Fail )
45
49
SetDefaultEventuallyTimeout (1 * time .Minute )
46
50
SetDefaultEventuallyPollingInterval (1 * time .Second )
47
- RunSpecs (t , "End-to-end" )
51
+
52
+ if junitDir := os .Getenv ("JUNIT_DIRECTORY" ); junitDir != "" {
53
+ junitReporter := reporters .NewJUnitReporter (path .Join (junitDir , fmt .Sprintf ("junit_e2e_%02d.xml" , config .GinkgoConfig .ParallelNode )))
54
+ RunSpecsWithDefaultAndCustomReporters (t , "End-to-end" , []Reporter {junitReporter })
55
+ } else {
56
+ RunSpecs (t , "End-to-end" )
57
+ }
48
58
}
49
59
50
60
var deprovision func () = func () {}
You can’t perform that action at this time.
0 commit comments