Merge pull request #53772 from xiangpengzhao/splitt-dapi-e2e

Automatic merge from submit-queue (batch tested with PRs 53507, 53772, 52903, 53543). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Split downward API e2e test case for pod/host IP into two

**What this PR does / why we need it**:
Split the test case in order to avoid version block pod IP e2e test.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
ref: https://github.com/kubernetes/kubernetes/pull/42717#discussion_r144026427

**Special notes for your reviewer**:
/cc @timothysc @andrewsykim
This commit is contained in:
Kubernetes Submit Queue 2017-10-13 13:53:16 -07:00 committed by GitHub
commit 2030730155

View File

@ -65,8 +65,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations)
})
It("should provide pod and host IP as an env var [Conformance]", func() {
framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
It("should provide pod IP as an env var [Conformance]", func() {
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{
{
@ -78,6 +77,19 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
},
},
},
}
expectations := []string{
"POD_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
}
testDownwardAPI(f, podName, env, expectations)
})
It("should provide host IP as an env var [Conformance]", func() {
framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{
{
Name: "HOST_IP",
ValueFrom: &v1.EnvVarSource{
@ -90,7 +102,6 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
}
expectations := []string{
"POD_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
"HOST_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
}