mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
kubeadm: Form correct URL for IPv6 in HTTPProxy check
Force correct syntax on host/port in URL of HTTPProxy check if the host argument is a raw IPv6 address string
This commit is contained in:
@@ -590,6 +590,22 @@ func TestHTTPProxyCheck(t *testing.T) {
|
||||
}, // Expected to go via proxy, range is not in 2001:db8::/48
|
||||
expectWarnings: true,
|
||||
},
|
||||
{
|
||||
name: "IPv6 direct access, no brackets",
|
||||
check: HTTPProxyCheck{
|
||||
Proto: "https",
|
||||
Host: "2001:db8::1:15",
|
||||
}, // Expected to be accessed directly, part of 2001:db8::/48 in NO_PROXY
|
||||
expectWarnings: false,
|
||||
},
|
||||
{
|
||||
name: "IPv6 via proxy, no brackets",
|
||||
check: HTTPProxyCheck{
|
||||
Proto: "https",
|
||||
Host: "2001:db8:1::1:15",
|
||||
}, // Expected to go via proxy, range is not in 2001:db8::/48
|
||||
expectWarnings: true,
|
||||
},
|
||||
}
|
||||
|
||||
// Save current content of *_proxy and *_PROXY variables.
|
||||
|
Reference in New Issue
Block a user