use core client with explicit version globally
This commit is contained in:
@@ -70,7 +70,7 @@ var _ = SIGDescribe("EmptyDir wrapper volumes", func() {
|
||||
}
|
||||
|
||||
var err error
|
||||
if secret, err = f.ClientSet.Core().Secrets(f.Namespace.Name).Create(secret); err != nil {
|
||||
if secret, err = f.ClientSet.CoreV1().Secrets(f.Namespace.Name).Create(secret); err != nil {
|
||||
framework.Failf("unable to create test secret %s: %v", secret.Name, err)
|
||||
}
|
||||
|
||||
@@ -126,11 +126,11 @@ var _ = SIGDescribe("EmptyDir wrapper volumes", func() {
|
||||
|
||||
defer func() {
|
||||
By("Cleaning up the secret")
|
||||
if err := f.ClientSet.Core().Secrets(f.Namespace.Name).Delete(secret.Name, nil); err != nil {
|
||||
if err := f.ClientSet.CoreV1().Secrets(f.Namespace.Name).Delete(secret.Name, nil); err != nil {
|
||||
framework.Failf("unable to delete secret %v: %v", secret.Name, err)
|
||||
}
|
||||
By("Cleaning up the git vol pod")
|
||||
if err = f.ClientSet.Core().Pods(f.Namespace.Name).Delete(pod.Name, metav1.NewDeleteOptions(0)); err != nil {
|
||||
if err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Delete(pod.Name, metav1.NewDeleteOptions(0)); err != nil {
|
||||
framework.Failf("unable to delete git vol pod %v: %v", pod.Name, err)
|
||||
}
|
||||
}()
|
||||
@@ -218,17 +218,17 @@ func createGitServer(f *framework.Framework) (gitURL string, gitRepo string, cle
|
||||
},
|
||||
}
|
||||
|
||||
if gitServerSvc, err = f.ClientSet.Core().Services(f.Namespace.Name).Create(gitServerSvc); err != nil {
|
||||
if gitServerSvc, err = f.ClientSet.CoreV1().Services(f.Namespace.Name).Create(gitServerSvc); err != nil {
|
||||
framework.Failf("unable to create test git server service %s: %v", gitServerSvc.Name, err)
|
||||
}
|
||||
|
||||
return "http://" + gitServerSvc.Spec.ClusterIP + ":" + strconv.Itoa(httpPort), "test", func() {
|
||||
By("Cleaning up the git server pod")
|
||||
if err := f.ClientSet.Core().Pods(f.Namespace.Name).Delete(gitServerPod.Name, metav1.NewDeleteOptions(0)); err != nil {
|
||||
if err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Delete(gitServerPod.Name, metav1.NewDeleteOptions(0)); err != nil {
|
||||
framework.Failf("unable to delete git server pod %v: %v", gitServerPod.Name, err)
|
||||
}
|
||||
By("Cleaning up the git server svc")
|
||||
if err := f.ClientSet.Core().Services(f.Namespace.Name).Delete(gitServerSvc.Name, nil); err != nil {
|
||||
if err := f.ClientSet.CoreV1().Services(f.Namespace.Name).Delete(gitServerSvc.Name, nil); err != nil {
|
||||
framework.Failf("unable to delete git server svc %v: %v", gitServerSvc.Name, err)
|
||||
}
|
||||
}
|
||||
@@ -268,7 +268,7 @@ func createConfigmapsForRace(f *framework.Framework) (configMapNames []string) {
|
||||
"data-1": "value-1",
|
||||
},
|
||||
}
|
||||
_, err := f.ClientSet.Core().ConfigMaps(f.Namespace.Name).Create(configMap)
|
||||
_, err := f.ClientSet.CoreV1().ConfigMaps(f.Namespace.Name).Create(configMap)
|
||||
framework.ExpectNoError(err)
|
||||
}
|
||||
return
|
||||
@@ -277,7 +277,7 @@ func createConfigmapsForRace(f *framework.Framework) (configMapNames []string) {
|
||||
func deleteConfigMaps(f *framework.Framework, configMapNames []string) {
|
||||
By("Cleaning up the configMaps")
|
||||
for _, configMapName := range configMapNames {
|
||||
err := f.ClientSet.Core().ConfigMaps(f.Namespace.Name).Delete(configMapName, nil)
|
||||
err := f.ClientSet.CoreV1().ConfigMaps(f.Namespace.Name).Delete(configMapName, nil)
|
||||
Expect(err).NotTo(HaveOccurred(), "unable to delete configMap %v", configMapName)
|
||||
}
|
||||
}
|
||||
@@ -368,7 +368,7 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume
|
||||
},
|
||||
},
|
||||
}
|
||||
_, err := f.ClientSet.Core().ReplicationControllers(f.Namespace.Name).Create(rc)
|
||||
_, err := f.ClientSet.CoreV1().ReplicationControllers(f.Namespace.Name).Create(rc)
|
||||
Expect(err).NotTo(HaveOccurred(), "error creating replication controller")
|
||||
|
||||
defer func() {
|
||||
|
Reference in New Issue
Block a user