Commit 20307301 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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
parents ef841cc9 2528faa4
...@@ -65,8 +65,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -65,8 +65,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
testDownwardAPI(f, podName, env, expectations) testDownwardAPI(f, podName, env, expectations)
}) })
It("should provide pod and host IP as an env var [Conformance]", func() { It("should provide pod IP as an env var [Conformance]", func() {
framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
podName := "downward-api-" + string(uuid.NewUUID()) podName := "downward-api-" + string(uuid.NewUUID())
env := []v1.EnvVar{ env := []v1.EnvVar{
{ {
...@@ -78,6 +77,19 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -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", Name: "HOST_IP",
ValueFrom: &v1.EnvVarSource{ ValueFrom: &v1.EnvVarSource{
...@@ -90,7 +102,6 @@ var _ = Describe("[sig-api-machinery] Downward API", func() { ...@@ -90,7 +102,6 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
} }
expectations := []string{ expectations := []string{
"POD_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
"HOST_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)", "HOST_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment