Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions pkg/test/extensions/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import (
"k8s.io/klog/v2"
k8simage "k8s.io/kubernetes/test/utils/image"

k8sgenerated "k8s.io/kubernetes/openshift-hack/e2e/annotate/generated"

"github.com/openshift/origin/pkg/clioptions/clusterdiscovery"
"github.com/openshift/origin/pkg/clioptions/imagesetup"
"github.com/openshift/origin/pkg/clioptions/upgradeoptions"
Expand Down Expand Up @@ -76,17 +74,17 @@ func InitializeOpenShiftTestsExtensionFramework() (*extension.Registry, *extensi
return nil, nil, fmt.Errorf("failed to build extension test specs: %w", err)
}

// Apply annotations to test names only for upstream tests
specs.Walk(func(spec *extensiontests.ExtensionTestSpec) {
if append, ok := k8sgenerated.Annotations[spec.Name]; ok {
spec.Name += append
}
})

klog.Infof("Found %d test specs", len(specs))
// Filter out kube tests, vendor filtering isn't working within origin
specs = specs.Select(func(spec *extensiontests.ExtensionTestSpec) bool {
return !strings.Contains(spec.Name, "[Suite:k8s")
for _, cl := range spec.CodeLocations {
// If there is a CodeLocation for origin, that isn't simply "framework" it is not a vendored test
if strings.Contains(cl, "github.com/openshift/origin/") &&
!strings.Contains(cl, "github.com/openshift/origin/test/extended/util/framework.go") {
return true
}
}
return false
})
klog.Infof("%d test specs remain, after filtering out k8s", len(specs))

Expand Down
Loading