@@ -231,28 +231,14 @@ func (r *ginkgoTestRenamer) generateRename(name string, node types.TestSpec) {
231
231
newLabels += " [Suite:openshift/conformance/parallel]"
232
232
}
233
233
}
234
- codeLocations := node .CodeLocations ()
235
- if isGoModulePath (codeLocations [len (codeLocations )- 1 ].FileName , "k8s.io/kubernetes" , "test/e2e" ) {
236
- newLabels += " [Suite:k8s]"
237
- }
234
+ newLabels += " [Suite:k8s]"
238
235
239
236
if err := checkBalancedBrackets (newName ); err != nil {
240
237
r .errors = append (r .errors , err .Error ())
241
238
}
242
239
r .output [name ] = newLabels
243
240
}
244
241
245
- // isGoModulePath returns true if the packagePath reported by reflection is within a
246
- // module and given module path. When go mod is in use, module and modulePath are not
247
- // contiguous as they were in older golang versions with vendoring, so naive contains
248
- // tests fail.
249
- //
250
- // historically: ".../vendor/k8s.io/kubernetes/test/e2e"
251
- // go.mod: "k8s.io/[email protected] /test/e2e"
252
- func isGoModulePath (packagePath , module , modulePath string ) bool {
253
- return regexp .MustCompile (fmt .Sprintf (`\b%s(@[^/]*|)/%s\b` , regexp .QuoteMeta (module ), regexp .QuoteMeta (modulePath ))).MatchString (packagePath )
254
- }
255
-
256
242
// checkBalancedBrackets ensures that square brackets are balanced in generated test
257
243
// names. If they are not, it returns an error with the name of the test and a guess
258
244
// where the unmatched bracket(s) are.
0 commit comments