File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package extensions
22
33import (
44 "fmt"
5+ "strings"
56
67 et "github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
78)
@@ -25,10 +26,12 @@ func addLabelsToSpecs(specs et.ExtensionTestSpecs) {
2526 selectFunctions = append (selectFunctions , et .NameContains (name ))
2627 }
2728
28- // Add the label AND append it to the name
29+ // Add the label AND append it to the name (if it isn't present already)
2930 matching := specs .SelectAny (selectFunctions )
3031 for _ , spec := range matching {
31- spec .Name = fmt .Sprintf ("%s %s" , spec .Name , label )
32+ if ! strings .Contains (spec .Name , label ) {
33+ spec .Name = fmt .Sprintf ("%s %s" , spec .Name , label )
34+ }
3235 spec .Labels .Insert (label )
3336 }
3437 }
You can’t perform that action at this time.
0 commit comments