Merge pull request #929 from mythi/PR-2022-021

envtest: drop deprecated strings.Title()
This commit is contained in:
Dmitry Rozhkov 2022-03-29 10:58:25 +03:00 committed by GitHub
commit 42689adc21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,10 +17,12 @@ package envtest
import (
"context"
"path/filepath"
"strings"
"testing"
"time"
"golang.org/x/text/cases"
"golang.org/x/text/language"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
apps "k8s.io/api/apps/v1"
@ -273,10 +275,11 @@ func makeDaemonSet(name, image, initimage string) *apps.DaemonSet {
}}
}
title := cases.Title(language.English, cases.NoLower)
yes := true
ds.OwnerReferences = []metav1.OwnerReference{{
APIVersion: "deviceplugin.intel.com/v1",
Kind: strings.Title(name) + "DevicePlugin",
Kind: title.String(name) + "DevicePlugin",
Name: name,
Controller: &yes,
UID: uuid.NewUUID(),