Skip to content

Commit 9baee95

Browse files
committed
filter out k8s tests via code locations rather than suite info
1 parent da8a7f3 commit 9baee95

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/test/extensions/binary.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,14 @@ func InitializeOpenShiftTestsExtensionFramework() (*extension.Registry, *extensi
8686
klog.Infof("Found %d test specs", len(specs))
8787
// Filter out kube tests, vendor filtering isn't working within origin
8888
specs = specs.Select(func(spec *extensiontests.ExtensionTestSpec) bool {
89-
return !strings.Contains(spec.Name, "[Suite:k8s")
89+
for _, cl := range spec.CodeLocations {
90+
// If there is a CodeLocation for origin, that isn't simply "framework" it is not a vendored test
91+
if strings.Contains(cl, "github.com/openshift/origin/") &&
92+
!strings.Contains(cl, "github.com/openshift/origin/test/extended/util/framework.go") {
93+
return true
94+
}
95+
}
96+
return false
9097
})
9198
klog.Infof("%d test specs remain, after filtering out k8s", len(specs))
9299

0 commit comments

Comments
 (0)