@@ -2,14 +2,9 @@ package main
2
2
3
3
import (
4
4
"flag"
5
- "fmt"
6
5
"os"
7
6
"reflect"
8
- "strconv"
9
7
10
- et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
11
-
12
- "k8s.io/kubernetes/openshift-hack/e2e/annotate/generated"
13
8
"k8s.io/kubernetes/test/e2e/framework"
14
9
15
10
"github.com/spf13/cobra"
@@ -61,31 +56,31 @@ func main() {
61
56
Parents : []string {
62
57
"openshift/conformance/parallel/minimal" ,
63
58
},
64
- Qualifiers : []string {withExcludedTestsFilter ( `!name.contains('[Serial]') && labels.exists(l, l == "Conformance")` ) },
59
+ Qualifiers : []string {`!name.contains('[Serial]') && labels.exists(l, l == "Conformance")` },
65
60
})
66
61
67
62
kubeTestsExtension .AddSuite (e.Suite {
68
63
Name : "kubernetes/conformance/serial/minimal" ,
69
64
Parents : []string {
70
65
"openshift/conformance/serial/minimal" ,
71
66
},
72
- Qualifiers : []string {withExcludedTestsFilter ( `name.contains('[Serial]') && labels.exists(l, l == "Conformance")` ) },
67
+ Qualifiers : []string {`name.contains('[Serial]') && labels.exists(l, l == "Conformance")` },
73
68
})
74
69
75
70
kubeTestsExtension .AddSuite (e.Suite {
76
71
Name : "kubernetes/conformance/parallel" ,
77
72
Parents : []string {
78
73
"openshift/conformance/parallel" ,
79
74
},
80
- Qualifiers : []string {withExcludedTestsFilter ( `!name.contains('[Serial]')` ) },
75
+ Qualifiers : []string {`!name.contains('[Serial]')` },
81
76
})
82
77
83
78
kubeTestsExtension .AddSuite (e.Suite {
84
79
Name : "kubernetes/conformance/serial" ,
85
80
Parents : []string {
86
81
"openshift/conformance/serial" ,
87
82
},
88
- Qualifiers : []string {withExcludedTestsFilter ( `name.contains('[Serial]')` ) },
83
+ Qualifiers : []string {`name.contains('[Serial]')` },
89
84
})
90
85
91
86
for k , v := range image .GetOriginalImageConfigs () {
@@ -109,30 +104,6 @@ func main() {
109
104
}
110
105
})
111
106
112
- // Annotations get appended to test names, these are additions to upstream
113
- // tests for controlling skips, suite membership, etc.
114
- //
115
- // TODO:
116
- // - Remove this annotation code, and migrate to Labels/Tags and
117
- // the environmental skip code from the enhancement once its implemented.
118
- // - Make sure to account for test renames that occur because of removal of these
119
- // annotations
120
- var omitAnnotations bool
121
- omitAnnotationsVal := os .Getenv ("OMIT_ANNOTATIONS" )
122
- if omitAnnotationsVal != "" {
123
- omitAnnotations , err = strconv .ParseBool (omitAnnotationsVal )
124
- if err != nil {
125
- panic ("Failed to parse OMIT_ANNOTATIONS: " + err .Error ())
126
- }
127
- }
128
- if ! omitAnnotations {
129
- specs .Walk (func (spec * et.ExtensionTestSpec ) {
130
- if annotations , ok := generated .Annotations [spec .Name ]; ok {
131
- spec .Name += annotations
132
- }
133
- })
134
- }
135
-
136
107
specs = filterOutDisabledSpecs (specs )
137
108
addLabelsToSpecs (specs )
138
109
@@ -179,27 +150,3 @@ func convertToImage(obj interface{}) e.Image {
179
150
}
180
151
return image
181
152
}
182
-
183
- func withExcludedTestsFilter (baseExpr string ) string {
184
- excluded := []string {
185
- "[Disabled:" ,
186
- "[Disruptive]" ,
187
- "[Skipped]" ,
188
- "[Slow]" ,
189
- "[Flaky]" ,
190
- "[Local]" ,
191
- }
192
-
193
- filter := ""
194
- for i , s := range excluded {
195
- if i > 0 {
196
- filter += " && "
197
- }
198
- filter += fmt .Sprintf ("!name.contains('%s')" , s )
199
- }
200
-
201
- if baseExpr != "" {
202
- return fmt .Sprintf ("(%s) && (%s)" , baseExpr , filter )
203
- }
204
- return filter
205
- }
0 commit comments