Skip to content

Commit 0465980

Browse files
committed
fixup: services
1 parent 9908e9a commit 0465980

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

pkg/services/services_test.go

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

33
import (
4+
"strings"
45
"testing"
56

67
config "github.com/openshift/api/config/v1"
@@ -473,7 +474,7 @@ func TestGetLogRunnerForCmd(t *testing.T) {
473474

474475
// Verify ordering: KubeLogRunnerPath must come first, commandPath must come last
475476
assert.True(t, len(result) > 0, "Result should not be empty")
476-
assert.Equal(t, 0, indexOf(result, windows.KubeLogRunnerPath),
477+
assert.Equal(t, 0, strings.Index(result, windows.KubeLogRunnerPath),
477478
"KubeLogRunnerPath must be at the start of the command")
478479
expectedSuffix := " " + tc.commandPath
479480
assert.True(t, len(result) >= len(expectedSuffix) &&
@@ -482,13 +483,3 @@ func TestGetLogRunnerForCmd(t *testing.T) {
482483
})
483484
}
484485
}
485-
486-
// indexOf returns the index of the first occurrence of substr in s, or -1 if not found.
487-
func indexOf(s, substr string) int {
488-
for i := 0; i <= len(s)-len(substr); i++ {
489-
if s[i:i+len(substr)] == substr {
490-
return i
491-
}
492-
}
493-
return -1
494-
}

0 commit comments

Comments
 (0)