mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +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
|
podNames []string
|
||||||
|
|
||||||
// All created PVs, incl. the one in resource
|
// All created PVs, incl. the one in resource
|
||||||
pvNames sets.String
|
pvNames sets.Set[string]
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
l local
|
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
|
var cleanupErrors []string
|
||||||
for _, podName := range podNames {
|
for _, podName := range podNames {
|
||||||
err := cs.CoreV1().Pods(ns).Delete(ctx, podName, metav1.DeleteOptions{})
|
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.
|
// 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) {
|
func waitForAllPVCsBound(ctx context.Context, cs clientset.Interface, timeout time.Duration, ns string, pvcNames []string) (sets.Set[string], error) {
|
||||||
pvNames := sets.NewString()
|
pvNames := sets.New[string]()
|
||||||
err := wait.Poll(5*time.Second, timeout, func() (bool, error) {
|
err := wait.Poll(5*time.Second, timeout, func() (bool, error) {
|
||||||
unbound := 0
|
unbound := 0
|
||||||
for _, pvcName := range pvcNames {
|
for _, pvcName := range pvcNames {
|
||||||
|
Loading…
Reference in New Issue
Block a user