1
1
package main
2
2
3
- import et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
3
+ import (
4
+ "fmt"
5
+
6
+ et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
7
+ )
4
8
5
9
// addEnvironmentSelectors adds the environmentSelector field to appropriate specs to facilitate including or excluding
6
10
// them based on attributes of the cluster they are running on
@@ -16,7 +20,7 @@ func addEnvironmentSelectors(specs et.ExtensionTestSpecs) {
16
20
specs .SelectAny ([]et.SelectFunction { // Since these must use "NameContainsAll" they cannot be included in filterByPlatform
17
21
et .NameContainsAll ("[sig-network] LoadBalancers [Feature:LoadBalancer]" , "UDP" ),
18
22
et .NameContainsAll ("[sig-network] LoadBalancers [Feature:LoadBalancer]" , "session affinity" ),
19
- }).Exclude (et .PlatformEquals ("aws" ))
23
+ }).Exclude (et .PlatformEquals ("aws" )). AddLabel ( "[Skipped:aws]" )
20
24
}
21
25
22
26
// filterByPlatform is a helper function to do, simple, "NameContains" filtering on tests by platform
@@ -118,7 +122,9 @@ func filterByPlatform(specs et.ExtensionTestSpecs) {
118
122
selectFunctions = append (selectFunctions , et .NameContains (exclusion ))
119
123
}
120
124
121
- specs .SelectAny (selectFunctions ).Exclude (et .PlatformEquals (platform ))
125
+ specs .SelectAny (selectFunctions ).
126
+ Exclude (et .PlatformEquals (platform )).
127
+ AddLabel (fmt .Sprintf ("[Skipped:%s]" , platform ))
122
128
}
123
129
}
124
130
@@ -160,7 +166,9 @@ func filterByExternalConnectivity(specs et.ExtensionTestSpecs) {
160
166
selectFunctions = append (selectFunctions , et .NameContains (exclusion ))
161
167
}
162
168
163
- specs .SelectAny (selectFunctions ).Exclude (et .ExternalConnectivityEquals (externalConnectivity ))
169
+ specs .SelectAny (selectFunctions ).
170
+ Exclude (et .ExternalConnectivityEquals (externalConnectivity )).
171
+ AddLabel (fmt .Sprintf ("[Skipped:%s]" , externalConnectivity ))
164
172
}
165
173
}
166
174
@@ -189,7 +197,9 @@ func filterByTopology(specs et.ExtensionTestSpecs) {
189
197
selectFunctions = append (selectFunctions , et .NameContains (exclusion ))
190
198
}
191
199
192
- specs .SelectAny (selectFunctions ).Exclude (et .TopologyEquals (topology ))
200
+ specs .SelectAny (selectFunctions ).
201
+ Exclude (et .TopologyEquals (topology )).
202
+ AddLabel (fmt .Sprintf ("[Skipped:%s]" , topology ))
193
203
}
194
204
}
195
205
@@ -208,7 +218,9 @@ func filterByNoOptionalCapabilities(specs et.ExtensionTestSpecs) {
208
218
for _ , exclusion := range exclusions {
209
219
selectFunctions = append (selectFunctions , et .NameContains (exclusion ))
210
220
}
211
- specs .SelectAny (selectFunctions ).Exclude (et .NoOptionalCapabilitiesExist ())
221
+ specs .SelectAny (selectFunctions ).
222
+ Exclude (et .NoOptionalCapabilitiesExist ()).
223
+ AddLabel ("[Skipped:NoOptionalCapabilities]" )
212
224
}
213
225
214
226
// filterByNetwork is a helper function to do, simple, "NameContains" filtering on tests by network
@@ -226,6 +238,8 @@ func filterByNetwork(specs et.ExtensionTestSpecs) {
226
238
selectFunctions = append (selectFunctions , et .NameContains (exclusion ))
227
239
}
228
240
229
- specs .SelectAny (selectFunctions ).Exclude (et .NetworkEquals (network ))
241
+ specs .SelectAny (selectFunctions ).
242
+ Exclude (et .NetworkEquals (network )).
243
+ AddLabel (fmt .Sprintf ("[Skipped:%s]" , network ))
230
244
}
231
245
}
0 commit comments