mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-13 06:04:02 +00:00
Update client callers to use explicit versions
This commit is contained in:
@@ -162,13 +162,13 @@ func TestPodDeletionWithDswp(t *testing.T) {
|
||||
pod := fakePodWithVol(namespaceName)
|
||||
podStopCh := make(chan struct{})
|
||||
|
||||
if _, err := testClient.Core().Nodes().Create(node); err != nil {
|
||||
if _, err := testClient.CoreV1().Nodes().Create(node); err != nil {
|
||||
t.Fatalf("Failed to created node : %v", err)
|
||||
}
|
||||
|
||||
go informers.Core().V1().Nodes().Informer().Run(podStopCh)
|
||||
|
||||
if _, err := testClient.Core().Pods(ns.Name).Create(pod); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(ns.Name).Create(pod); err != nil {
|
||||
t.Errorf("Failed to create pod : %v", err)
|
||||
}
|
||||
|
||||
@@ -229,13 +229,13 @@ func TestPodUpdateWithWithADC(t *testing.T) {
|
||||
pod := fakePodWithVol(namespaceName)
|
||||
podStopCh := make(chan struct{})
|
||||
|
||||
if _, err := testClient.Core().Nodes().Create(node); err != nil {
|
||||
if _, err := testClient.CoreV1().Nodes().Create(node); err != nil {
|
||||
t.Fatalf("Failed to created node : %v", err)
|
||||
}
|
||||
|
||||
go informers.Core().V1().Nodes().Informer().Run(podStopCh)
|
||||
|
||||
if _, err := testClient.Core().Pods(ns.Name).Create(pod); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(ns.Name).Create(pod); err != nil {
|
||||
t.Errorf("Failed to create pod : %v", err)
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ func TestPodUpdateWithWithADC(t *testing.T) {
|
||||
|
||||
pod.Status.Phase = v1.PodSucceeded
|
||||
|
||||
if _, err := testClient.Core().Pods(ns.Name).UpdateStatus(pod); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(ns.Name).UpdateStatus(pod); err != nil {
|
||||
t.Errorf("Failed to update pod : %v", err)
|
||||
}
|
||||
|
||||
@@ -297,13 +297,13 @@ func TestPodUpdateWithKeepTerminatedPodVolumes(t *testing.T) {
|
||||
pod := fakePodWithVol(namespaceName)
|
||||
podStopCh := make(chan struct{})
|
||||
|
||||
if _, err := testClient.Core().Nodes().Create(node); err != nil {
|
||||
if _, err := testClient.CoreV1().Nodes().Create(node); err != nil {
|
||||
t.Fatalf("Failed to created node : %v", err)
|
||||
}
|
||||
|
||||
go informers.Core().V1().Nodes().Informer().Run(podStopCh)
|
||||
|
||||
if _, err := testClient.Core().Pods(ns.Name).Create(pod); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(ns.Name).Create(pod); err != nil {
|
||||
t.Errorf("Failed to create pod : %v", err)
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ func TestPodUpdateWithKeepTerminatedPodVolumes(t *testing.T) {
|
||||
|
||||
pod.Status.Phase = v1.PodSucceeded
|
||||
|
||||
if _, err := testClient.Core().Pods(ns.Name).UpdateStatus(pod); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(ns.Name).UpdateStatus(pod); err != nil {
|
||||
t.Errorf("Failed to update pod : %v", err)
|
||||
}
|
||||
|
||||
@@ -474,13 +474,13 @@ func TestPodAddedByDswp(t *testing.T) {
|
||||
pod := fakePodWithVol(namespaceName)
|
||||
podStopCh := make(chan struct{})
|
||||
|
||||
if _, err := testClient.Core().Nodes().Create(node); err != nil {
|
||||
if _, err := testClient.CoreV1().Nodes().Create(node); err != nil {
|
||||
t.Fatalf("Failed to created node : %v", err)
|
||||
}
|
||||
|
||||
go informers.Core().V1().Nodes().Informer().Run(podStopCh)
|
||||
|
||||
if _, err := testClient.Core().Pods(ns.Name).Create(pod); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(ns.Name).Create(pod); err != nil {
|
||||
t.Errorf("Failed to create pod : %v", err)
|
||||
}
|
||||
|
||||
@@ -549,7 +549,7 @@ func TestPVCBoundWithADC(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
if _, err := testClient.Core().Nodes().Create(node); err != nil {
|
||||
if _, err := testClient.CoreV1().Nodes().Create(node); err != nil {
|
||||
t.Fatalf("Failed to created node : %v", err)
|
||||
}
|
||||
|
||||
@@ -557,10 +557,10 @@ func TestPVCBoundWithADC(t *testing.T) {
|
||||
pvcs := []*v1.PersistentVolumeClaim{}
|
||||
for i := 0; i < 3; i++ {
|
||||
pod, pvc := fakePodWithPVC(fmt.Sprintf("fakepod-pvcnotbound-%d", i), fmt.Sprintf("fakepvc-%d", i), namespaceName)
|
||||
if _, err := testClient.Core().Pods(pod.Namespace).Create(pod); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(pod.Namespace).Create(pod); err != nil {
|
||||
t.Errorf("Failed to create pod : %v", err)
|
||||
}
|
||||
if _, err := testClient.Core().PersistentVolumeClaims(pvc.Namespace).Create(pvc); err != nil {
|
||||
if _, err := testClient.CoreV1().PersistentVolumeClaims(pvc.Namespace).Create(pvc); err != nil {
|
||||
t.Errorf("Failed to create pvc : %v", err)
|
||||
}
|
||||
pvcs = append(pvcs, pvc)
|
||||
@@ -568,7 +568,7 @@ func TestPVCBoundWithADC(t *testing.T) {
|
||||
// pod with no pvc
|
||||
podNew := fakePodWithVol(namespaceName)
|
||||
podNew.SetName("fakepod")
|
||||
if _, err := testClient.Core().Pods(podNew.Namespace).Create(podNew); err != nil {
|
||||
if _, err := testClient.CoreV1().Pods(podNew.Namespace).Create(podNew); err != nil {
|
||||
t.Errorf("Failed to create pod : %v", err)
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ func createPVForPVC(t *testing.T, testClient *clientset.Clientset, pvc *v1.Persi
|
||||
StorageClassName: *pvc.Spec.StorageClassName,
|
||||
},
|
||||
}
|
||||
if _, err := testClient.Core().PersistentVolumes().Create(pv); err != nil {
|
||||
if _, err := testClient.CoreV1().PersistentVolumes().Create(pv); err != nil {
|
||||
t.Errorf("Failed to create pv : %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user