mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2026-01-08 08:11:55 +00:00
Add more strict IPv6 regex
Previous IPv6 regex was too loose, this patchs adds a better and more strict regex for IPv6 addresses and makes the IPv4 and IPv6 regex availables as constants inside the framework pkg
This commit is contained in:
@@ -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+|[a-fA-F0-9:]+)",
|
||||
fmt.Sprintf("POD_IP=%v|%v", framework.RegexIPv4, framework.RegexIPv6),
|
||||
}
|
||||
|
||||
testDownwardAPI(f, podName, env, expectations)
|
||||
@@ -105,7 +105,7 @@ var _ = Describe("[sig-node] Downward API", func() {
|
||||
}
|
||||
|
||||
expectations := []string{
|
||||
"HOST_IP=(?:\\d+\\.\\d+\\.\\d+\\.\\d+|[a-fA-F0-9:]+)",
|
||||
fmt.Sprintf("HOST_IP=%v|%v", framework.RegexIPv4, framework.RegexIPv6),
|
||||
}
|
||||
|
||||
testDownwardAPI(f, podName, env, expectations)
|
||||
|
||||
Reference in New Issue
Block a user