generated: run refactor

This commit is contained in:
Mike Danese
2020-02-07 18:16:47 -08:00
parent 7e88d8db66
commit 3aa59f7f30
697 changed files with 4380 additions and 3806 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package integration
import (
"context"
"testing"
"time"
@@ -34,7 +35,7 @@ import (
// DeletePodOrErrorf deletes a pod or fails with a call to t.Errorf.
func DeletePodOrErrorf(t *testing.T, c clientset.Interface, ns, name string) {
if err := c.CoreV1().Pods(ns).Delete(name, nil); err != nil {
if err := c.CoreV1().Pods(ns).Delete(context.TODO(), name, nil); err != nil {
t.Errorf("unable to delete pod %v: %v", name, err)
}
}
@@ -58,7 +59,7 @@ var (
// WaitForPodToDisappear polls the API server if the pod has been deleted.
func WaitForPodToDisappear(podClient coreclient.PodInterface, podName string, interval, timeout time.Duration) error {
return wait.PollImmediate(interval, timeout, func() (bool, error) {
_, err := podClient.Get(podName, metav1.GetOptions{})
_, err := podClient.Get(context.TODO(), podName, metav1.GetOptions{})
if err == nil {
return false, nil
}