Skip to content

Commit 89bd739

Browse files
committed
append labels to name as there are some instances where it is expected to be found
1 parent 4d9b126 commit 89bd739

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pkg/test/extensions/labels.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package extensions
22

33
import (
4+
"fmt"
5+
46
et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
57
)
68

@@ -23,7 +25,11 @@ func addLabelsToSpecs(specs et.ExtensionTestSpecs) {
2325
selectFunctions = append(selectFunctions, et.NameContains(name))
2426
}
2527

26-
//TODO: once annotation logic has been removed, it might also be necessary to annotate the test name with the label as well
27-
specs.SelectAny(selectFunctions).AddLabel(label)
28+
// Add the label AND append it to the name
29+
matching := specs.SelectAny(selectFunctions)
30+
for _, spec := range matching {
31+
spec.Name = fmt.Sprintf("%s %s", spec.Name, label)
32+
spec.Labels.Insert(label)
33+
}
2834
}
2935
}

0 commit comments

Comments
 (0)