mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
replace sets.String with sets.Set[string]
The former is deprecated
This commit is contained in:
parent
30ec771cf6
commit
e687f93f16
@ -112,7 +112,7 @@ func (t *volumeLimitsTestSuite) DefineTests(driver storageframework.TestDriver,
|
||||
podNames []string
|
||||
|
||||
// All created PVs, incl. the one in resource
|
||||
pvNames sets.String
|
||||
pvNames sets.Set[string]
|
||||
}
|
||||
var (
|
||||
l local
|
||||
@ -279,7 +279,7 @@ func (t *volumeLimitsTestSuite) DefineTests(driver storageframework.TestDriver,
|
||||
})
|
||||
}
|
||||
|
||||
func cleanupTest(ctx context.Context, cs clientset.Interface, ns string, podNames, pvcNames []string, pvNames sets.String, timeout time.Duration) error {
|
||||
func cleanupTest(ctx context.Context, cs clientset.Interface, ns string, podNames, pvcNames []string, pvNames sets.Set[string], timeout time.Duration) error {
|
||||
var cleanupErrors []string
|
||||
for _, podName := range podNames {
|
||||
err := cs.CoreV1().Pods(ns).Delete(ctx, podName, metav1.DeleteOptions{})
|
||||
@ -326,8 +326,8 @@ func cleanupTest(ctx context.Context, cs clientset.Interface, ns string, podName
|
||||
}
|
||||
|
||||
// waitForAllPVCsBound waits until the given PVCs are all bound. It then returns the bound PVC names as a set.
|
||||
func waitForAllPVCsBound(ctx context.Context, cs clientset.Interface, timeout time.Duration, ns string, pvcNames []string) (sets.String, error) {
|
||||
pvNames := sets.NewString()
|
||||
func waitForAllPVCsBound(ctx context.Context, cs clientset.Interface, timeout time.Duration, ns string, pvcNames []string) (sets.Set[string], error) {
|
||||
pvNames := sets.New[string]()
|
||||
err := wait.Poll(5*time.Second, timeout, func() (bool, error) {
|
||||
unbound := 0
|
||||
for _, pvcName := range pvcNames {
|
||||
|
Loading…
Reference in New Issue
Block a user