@@ -11,7 +11,6 @@ import (
11
11
"strings"
12
12
13
13
"github.com/onsi/ginkgo/v2"
14
- "github.com/onsi/ginkgo/v2/config"
15
14
"github.com/onsi/ginkgo/v2/reporters"
16
15
"github.com/onsi/gomega"
17
16
"k8s.io/klog/v2"
@@ -112,14 +111,16 @@ func ExecuteTest(t ginkgo.GinkgoTestingT, suite string) {
112
111
defer e2e .CoreDump (TestContext .ReportDir )
113
112
}
114
113
115
- if config .GinkgoConfig .FocusString == "" && config .GinkgoConfig .SkipString == "" {
116
- config .GinkgoConfig .SkipString = "Skipped"
114
+ suiteConfig , _ := ginkgo .GinkgoConfiguration ()
115
+
116
+ if len (suiteConfig .FocusStrings ) == 0 && len (suiteConfig .SkipStrings ) == 0 {
117
+ suiteConfig .SkipStrings = []string {"Skipped" }
117
118
}
118
119
119
120
gomega .RegisterFailHandler (ginkgo .Fail )
120
121
121
122
if TestContext .ReportDir != "" {
122
- r = append (r , reporters .NewJUnitReporter (path .Join (TestContext .ReportDir , fmt .Sprintf ("%s_%02d.xml" , reportFileName , config . GinkgoConfig . ParallelNode ))))
123
+ r = append (r , reporters .NewJUnitReporter (path .Join (TestContext .ReportDir , fmt .Sprintf ("%s_%02d.xml" , reportFileName , suiteConfig . ParallelProcess ))))
123
124
}
124
125
125
126
WithCleanup (func () {
@@ -268,13 +269,16 @@ func checkSyntheticInput() {
268
269
// checkSuiteSkips ensures Origin/Kubernetes synthetic skip labels are applied
269
270
// DEPRECATED: remove in a future release
270
271
func checkSuiteSkips () {
272
+ suiteConfig , _ := ginkgo .GinkgoConfiguration ()
271
273
switch {
272
274
case isOriginTest ():
273
- if strings .Contains (config .GinkgoConfig .SkipString , "Synthetic Origin" ) {
275
+ skip := strings .Join (suiteConfig .SkipStrings , "|" )
276
+ if strings .Contains (skip , "Synthetic Origin" ) {
274
277
ginkgo .Skip ("skipping all openshift/origin tests" )
275
278
}
276
279
case isKubernetesE2ETest ():
277
- if strings .Contains (config .GinkgoConfig .SkipString , "Synthetic Kubernetes" ) {
280
+ skip := strings .Join (suiteConfig .SkipStrings , "|" )
281
+ if strings .Contains (skip , "Synthetic Kubernetes" ) {
278
282
ginkgo .Skip ("skipping all k8s.io/kubernetes tests" )
279
283
}
280
284
}
0 commit comments