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 pod
import (
"context"
"encoding/json"
"fmt"
@@ -34,7 +35,7 @@ func PatchPodStatus(c clientset.Interface, namespace, name string, uid types.UID
return nil, nil, err
}
updatedPod, err := c.CoreV1().Pods(namespace).Patch(name, types.StrategicMergePatchType, patchBytes, "status")
updatedPod, err := c.CoreV1().Pods(namespace).Patch(context.TODO(), name, types.StrategicMergePatchType, patchBytes, "status")
if err != nil {
return nil, nil, fmt.Errorf("failed to patch status %q for pod %q/%q: %v", patchBytes, namespace, name, err)
}

View File

@@ -17,6 +17,7 @@ limitations under the License.
package pod
import (
"context"
"fmt"
"testing"
@@ -33,7 +34,7 @@ func TestPatchPodStatus(t *testing.T) {
name := "name"
uid := types.UID("myuid")
client := &fake.Clientset{}
client.CoreV1().Pods(ns).Create(&v1.Pod{
client.CoreV1().Pods(ns).Create(context.TODO(), &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Namespace: ns,
Name: name,