mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Add IPv6 support to the Downward e2e API test
Current regex used in the Downward e2e API tests is matching only IPv4 addresses, consequently those tests fails with IPv6 clusters. This patch modifies the regex to match ipv4 and ipv6 addresses. Ref: https://github.com/kubernetes/kubernetes/issues/70248
This commit is contained in:
parent
0b4275b6c7
commit
ae4ccc91b2
@ -78,7 +78,7 @@ var _ = Describe("[sig-node] Downward API", func() {
|
||||
expectations := []string{
|
||||
fmt.Sprintf("POD_NAME=%v", podName),
|
||||
fmt.Sprintf("POD_NAMESPACE=%v", f.Namespace.Name),
|
||||
"POD_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
|
||||
"POD_IP=(?:\\d+\\.\\d+\\.\\d+\\.\\d+|[a-fA-F0-9:]+)",
|
||||
}
|
||||
|
||||
testDownwardAPI(f, podName, env, expectations)
|
||||
@ -105,7 +105,7 @@ var _ = Describe("[sig-node] Downward API", func() {
|
||||
}
|
||||
|
||||
expectations := []string{
|
||||
"HOST_IP=(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)\\.(?:\\d+)",
|
||||
"HOST_IP=(?:\\d+\\.\\d+\\.\\d+\\.\\d+|[a-fA-F0-9:]+)",
|
||||
}
|
||||
|
||||
testDownwardAPI(f, podName, env, expectations)
|
||||
|
Loading…
Reference in New Issue
Block a user