mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
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:
commit
2030730155
@ -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() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
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() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
expectations := []string{
|
expectations := []string{
|
||||||
"POD_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
|
|
||||||
"HOST_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
|
"HOST_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user