Merge pull request #71625 from verult/exec-file-nodeselector

Volume exec file test: added NodeSelector to pod
This commit is contained in:
Kubernetes Prow Robot 2018-11-30 21:04:13 -08:00 committed by GitHub
commit a17742b53a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,11 +181,16 @@ func testVolumes(input *volumesTestInput) {
f := input.f f := input.f
skipExecTest(input.resource.driver) skipExecTest(input.resource.driver)
testScriptInPod(f, input.resource.volType, input.resource.volSource) testScriptInPod(f, input.resource.volType, input.resource.volSource, input.config.NodeSelector)
}) })
} }
func testScriptInPod(f *framework.Framework, volumeType string, source *v1.VolumeSource) { func testScriptInPod(
f *framework.Framework,
volumeType string,
source *v1.VolumeSource,
nodeSelector map[string]string) {
const ( const (
volPath = "/vol1" volPath = "/vol1"
volName = "vol1" volName = "vol1"
@ -221,6 +226,7 @@ func testScriptInPod(f *framework.Framework, volumeType string, source *v1.Volum
}, },
}, },
RestartPolicy: v1.RestartPolicyNever, RestartPolicy: v1.RestartPolicyNever,
NodeSelector: nodeSelector,
}, },
} }
By(fmt.Sprintf("Creating pod %s", pod.Name)) By(fmt.Sprintf("Creating pod %s", pod.Name))