mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
add apiServerCertSANs case for test GetAltNames
This commit is contained in:
parent
46c2bfe47d
commit
f65fbde607
@ -265,6 +265,7 @@ func TestGetAltNames(t *testing.T) {
|
||||
API: kubeadmapi.API{AdvertiseAddress: advertiseIP},
|
||||
Networking: kubeadmapi.Networking{ServiceSubnet: "10.96.0.0/12", DNSDomain: "cluster.local"},
|
||||
NodeName: hostname,
|
||||
APIServerCertSANs: []string{"10.1.245.94", "10.1.245.95"},
|
||||
}
|
||||
|
||||
altNames, err := getAltNames(cfg)
|
||||
@ -287,7 +288,7 @@ func TestGetAltNames(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
expectedIPAddresses := []string{"10.96.0.1", advertiseIP}
|
||||
expectedIPAddresses := []string{"10.96.0.1", advertiseIP, "10.1.245.94", "10.1.245.95"}
|
||||
for _, IPAddress := range expectedIPAddresses {
|
||||
found := false
|
||||
for _, val := range altNames.IPs {
|
||||
|
Loading…
Reference in New Issue
Block a user