Skip to content

Commit 46cc8ad

Browse files
committed
Use preferred import packages for test/e2e
Ran `hack/update-import-aliases.sh` Change-Id: Ieaf3599a80ec90026b2c83f25c797d121a461549
1 parent 18d7f88 commit 46cc8ad

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

test/e2e/framework/suites.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
"k8s.io/klog"
2626

27-
corev1 "k8s.io/api/core/v1"
27+
v1 "k8s.io/api/core/v1"
2828
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
"k8s.io/kubernetes/pkg/version"
3030
e2elog "k8s.io/kubernetes/test/e2e/framework/log"
@@ -62,7 +62,7 @@ func SetupSuite() {
6262
metav1.NamespaceSystem,
6363
metav1.NamespaceDefault,
6464
metav1.NamespacePublic,
65-
corev1.NamespaceNodeLease,
65+
v1.NamespaceNodeLease,
6666
})
6767
if err != nil {
6868
e2elog.Failf("Error deleting orphaned namespaces: %v", err)

test/e2e/network/dual_stack.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/onsi/ginkgo"
2424
"github.com/onsi/gomega"
2525

26-
apps "k8s.io/api/apps/v1"
26+
appsv1 "k8s.io/api/apps/v1"
2727
v1 "k8s.io/api/core/v1"
2828
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
clientset "k8s.io/client-go/kubernetes"
@@ -136,7 +136,7 @@ var _ = SIGDescribe("[Feature:IPv6DualStackAlphaFeature] [LinuxOnly]", func() {
136136
map[string]string{"test": "dual-stack-server"},
137137
"dualstack-test-server",
138138
imageutils.GetE2EImage(imageutils.TestWebserver),
139-
apps.RollingUpdateDeploymentStrategyType)
139+
appsv1.RollingUpdateDeploymentStrategyType)
140140

141141
// to ensure all the pods land on different nodes and we can thereby
142142
// validate connectivity across all nodes.
@@ -164,7 +164,7 @@ var _ = SIGDescribe("[Feature:IPv6DualStackAlphaFeature] [LinuxOnly]", func() {
164164
map[string]string{"test": "dual-stack-client"},
165165
"dualstack-test-client",
166166
imageutils.GetE2EImage(imageutils.Agnhost),
167-
apps.RollingUpdateDeploymentStrategyType)
167+
appsv1.RollingUpdateDeploymentStrategyType)
168168

169169
clientDeploymentSpec.Spec.Template.Spec.Containers[0].Command = []string{"sleep", "3600"}
170170
clientDeploymentSpec.Spec.Template.Spec.Affinity = &v1.Affinity{

test/e2e/storage/vsphere/vsphere_zone_support.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/onsi/gomega"
2626

2727
v1 "k8s.io/api/core/v1"
28-
storage "k8s.io/api/storage/v1"
28+
storagev1 "k8s.io/api/storage/v1"
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030
clientset "k8s.io/client-go/kubernetes"
3131
volumeevents "k8s.io/kubernetes/pkg/controller/volume/events"
@@ -313,21 +313,21 @@ var _ = utils.SIGDescribe("Zone Support", func() {
313313
ginkgo.It("Verify a pod is created and attached to a dynamically created PV with storage policy specified in storage class in waitForFirstConsumer binding mode", func() {
314314
ginkgo.By(fmt.Sprintf("Creating storage class with waitForFirstConsumer mode and storage policy :%s", compatPolicy))
315315
scParameters[SpbmStoragePolicy] = compatPolicy
316-
verifyPVCAndPodCreationSucceeds(client, namespace, scParameters, nil, storage.VolumeBindingWaitForFirstConsumer)
316+
verifyPVCAndPodCreationSucceeds(client, namespace, scParameters, nil, storagev1.VolumeBindingWaitForFirstConsumer)
317317
})
318318

319319
ginkgo.It("Verify a pod is created and attached to a dynamically created PV with storage policy specified in storage class in waitForFirstConsumer binding mode with allowedTopologies", func() {
320320
ginkgo.By(fmt.Sprintf("Creating storage class with waitForFirstConsumer mode, storage policy :%s and zone :%s", compatPolicy, zoneA))
321321
scParameters[SpbmStoragePolicy] = compatPolicy
322322
zones = append(zones, zoneA)
323-
verifyPVCAndPodCreationSucceeds(client, namespace, scParameters, zones, storage.VolumeBindingWaitForFirstConsumer)
323+
verifyPVCAndPodCreationSucceeds(client, namespace, scParameters, zones, storagev1.VolumeBindingWaitForFirstConsumer)
324324
})
325325

326326
ginkgo.It("Verify a pod is created and attached to a dynamically created PV with storage policy specified in storage class in waitForFirstConsumer binding mode with multiple allowedTopologies", func() {
327327
ginkgo.By(fmt.Sprintf("Creating storage class with waitForFirstConsumer mode and zones : %s, %s", zoneA, zoneB))
328328
zones = append(zones, zoneA)
329329
zones = append(zones, zoneB)
330-
verifyPVCAndPodCreationSucceeds(client, namespace, nil, zones, storage.VolumeBindingWaitForFirstConsumer)
330+
verifyPVCAndPodCreationSucceeds(client, namespace, nil, zones, storagev1.VolumeBindingWaitForFirstConsumer)
331331
})
332332

333333
ginkgo.It("Verify a PVC creation fails when multiple zones are specified in the storage class without shared datastores among the zones in waitForFirstConsumer binding mode", func() {
@@ -351,11 +351,11 @@ var _ = utils.SIGDescribe("Zone Support", func() {
351351
// nodeSelector set as zoneB
352352
v1.LabelZoneFailureDomain: zoneB,
353353
}
354-
verifyPodSchedulingFails(client, namespace, nodeSelectorMap, scParameters, zones, storage.VolumeBindingWaitForFirstConsumer)
354+
verifyPodSchedulingFails(client, namespace, nodeSelectorMap, scParameters, zones, storagev1.VolumeBindingWaitForFirstConsumer)
355355
})
356356
})
357357

358-
func verifyPVCAndPodCreationSucceeds(client clientset.Interface, namespace string, scParameters map[string]string, zones []string, volumeBindingMode storage.VolumeBindingMode) {
358+
func verifyPVCAndPodCreationSucceeds(client clientset.Interface, namespace string, scParameters map[string]string, zones []string, volumeBindingMode storagev1.VolumeBindingMode) {
359359
storageclass, err := client.StorageV1().StorageClasses().Create(getVSphereStorageClassSpec("zone-sc", scParameters, zones, volumeBindingMode))
360360
framework.ExpectNoError(err, fmt.Sprintf("Failed to create storage class with err: %v", err))
361361
defer client.StorageV1().StorageClasses().Delete(storageclass.Name, nil)
@@ -370,15 +370,15 @@ func verifyPVCAndPodCreationSucceeds(client clientset.Interface, namespace strin
370370

371371
var persistentvolumes []*v1.PersistentVolume
372372
// If WaitForFirstConsumer mode, verify pvc binding status after pod creation. For immediate mode, do now.
373-
if volumeBindingMode != storage.VolumeBindingWaitForFirstConsumer {
373+
if volumeBindingMode != storagev1.VolumeBindingWaitForFirstConsumer {
374374
persistentvolumes = waitForPVClaimBoundPhase(client, pvclaims, framework.ClaimProvisionTimeout)
375375
}
376376

377377
ginkgo.By("Creating pod to attach PV to the node")
378378
pod, err := framework.CreatePod(client, namespace, nil, pvclaims, false, "")
379379
framework.ExpectNoError(err)
380380

381-
if volumeBindingMode == storage.VolumeBindingWaitForFirstConsumer {
381+
if volumeBindingMode == storagev1.VolumeBindingWaitForFirstConsumer {
382382
persistentvolumes = waitForPVClaimBoundPhase(client, pvclaims, framework.ClaimProvisionTimeout)
383383
}
384384

@@ -398,7 +398,7 @@ func verifyPVCAndPodCreationSucceeds(client clientset.Interface, namespace strin
398398
}
399399

400400
func verifyPodAndPvcCreationFailureOnWaitForFirstConsumerMode(client clientset.Interface, namespace string, scParameters map[string]string, zones []string) error {
401-
storageclass, err := client.StorageV1().StorageClasses().Create(getVSphereStorageClassSpec("zone-sc", scParameters, zones, storage.VolumeBindingWaitForFirstConsumer))
401+
storageclass, err := client.StorageV1().StorageClasses().Create(getVSphereStorageClassSpec("zone-sc", scParameters, zones, storagev1.VolumeBindingWaitForFirstConsumer))
402402
framework.ExpectNoError(err, fmt.Sprintf("Failed to create storage class with err: %v", err))
403403
defer client.StorageV1().StorageClasses().Delete(storageclass.Name, nil)
404404

@@ -437,7 +437,7 @@ func waitForPVClaimBoundPhase(client clientset.Interface, pvclaims []*v1.Persist
437437
return persistentvolumes
438438
}
439439

440-
func verifyPodSchedulingFails(client clientset.Interface, namespace string, nodeSelector map[string]string, scParameters map[string]string, zones []string, volumeBindingMode storage.VolumeBindingMode) {
440+
func verifyPodSchedulingFails(client clientset.Interface, namespace string, nodeSelector map[string]string, scParameters map[string]string, zones []string, volumeBindingMode storagev1.VolumeBindingMode) {
441441
storageclass, err := client.StorageV1().StorageClasses().Create(getVSphereStorageClassSpec("zone-sc", scParameters, zones, volumeBindingMode))
442442
framework.ExpectNoError(err, fmt.Sprintf("Failed to create storage class with err: %v", err))
443443
defer client.StorageV1().StorageClasses().Delete(storageclass.Name, nil)
@@ -456,7 +456,7 @@ func verifyPodSchedulingFails(client clientset.Interface, namespace string, node
456456
defer framework.DeletePodWithWait(f, client, pod)
457457
}
458458

459-
func verifyPVCCreationFails(client clientset.Interface, namespace string, scParameters map[string]string, zones []string, volumeBindingMode storage.VolumeBindingMode) error {
459+
func verifyPVCCreationFails(client clientset.Interface, namespace string, scParameters map[string]string, zones []string, volumeBindingMode storagev1.VolumeBindingMode) error {
460460
storageclass, err := client.StorageV1().StorageClasses().Create(getVSphereStorageClassSpec("zone-sc", scParameters, zones, volumeBindingMode))
461461
framework.ExpectNoError(err, fmt.Sprintf("Failed to create storage class with err: %v", err))
462462
defer client.StorageV1().StorageClasses().Delete(storageclass.Name, nil)

0 commit comments

Comments
 (0)