From 6a94656d0e490513a90ebde54f74bbfb9f5a39af Mon Sep 17 00:00:00 2001 From: Masaki Kimura Date: Wed, 14 Nov 2018 16:10:14 +0000 Subject: [PATCH] Fix CreateSecPodWithNodeName to properly set node to be deployed --- test/e2e/framework/pv_util.go | 5 +++-- test/e2e/storage/testsuites/volumemode.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/e2e/framework/pv_util.go b/test/e2e/framework/pv_util.go index 53483fd193b..bc6e5c97b21 100644 --- a/test/e2e/framework/pv_util.go +++ b/test/e2e/framework/pv_util.go @@ -880,12 +880,13 @@ func CreateSecPod(client clientset.Interface, namespace string, pvclaims []*v1.P // create security pod with given claims func CreateSecPodWithNodeName(client clientset.Interface, namespace string, pvclaims []*v1.PersistentVolumeClaim, isPrivileged bool, command string, hostIPC bool, hostPID bool, seLinuxLabel *v1.SELinuxOptions, fsGroup *int64, nodeName string, timeout time.Duration) (*v1.Pod, error) { pod := MakeSecPod(namespace, pvclaims, isPrivileged, command, hostIPC, hostPID, seLinuxLabel, fsGroup) + // Setting nodeName + pod.Spec.NodeName = nodeName + pod, err := client.CoreV1().Pods(namespace).Create(pod) if err != nil { return nil, fmt.Errorf("pod Create API error: %v", err) } - // Setting nodeName - pod.Spec.NodeName = nodeName // Waiting for pod to be running err = WaitTimeoutForPodRunningInNamespace(client, pod.Name, namespace, timeout) diff --git a/test/e2e/storage/testsuites/volumemode.go b/test/e2e/storage/testsuites/volumemode.go index 31bdd9c4bd1..4854618bf41 100644 --- a/test/e2e/storage/testsuites/volumemode.go +++ b/test/e2e/storage/testsuites/volumemode.go @@ -342,7 +342,7 @@ func testVolumeModeSuccessForDynamicPV(input *volumeModeTestInput) { var err error // TODO: This skip should be removed once #70760 is fixed - skipTestUntilBugfix("70760", input.driverName, []string{"csi-hostpath", "com.google.csi.gcepd"}) + skipTestUntilBugfix("70760", input.driverName, []string{"com.google.csi.gcepd"}) By("Creating sc") input.sc, err = cs.StorageV1().StorageClasses().Create(input.sc)