mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Fixing Tests
This commit is contained in:
parent
9849db7fdf
commit
6f6ca0433f
@ -293,7 +293,23 @@ func getAvailabilityZone(metadata AWSMetadata) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func isRegionValid(region string) bool {
|
func isRegionValid(region string) bool {
|
||||||
return true
|
regions := [...]string{
|
||||||
|
"us-east-1",
|
||||||
|
"us-west-1",
|
||||||
|
"us-west-2",
|
||||||
|
"eu-west-1",
|
||||||
|
"eu-central-1",
|
||||||
|
"ap-southeast-1",
|
||||||
|
"ap-southeast-2",
|
||||||
|
"ap-northeast-1",
|
||||||
|
"sa-east-1",
|
||||||
|
}
|
||||||
|
for _, r := range regions {
|
||||||
|
if r == region {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// newAWSCloud creates a new instance of AWSCloud.
|
// newAWSCloud creates a new instance of AWSCloud.
|
||||||
|
@ -347,7 +347,7 @@ func TestNodeAddresses(t *testing.T) {
|
|||||||
instance0.State = &state0
|
instance0.State = &state0
|
||||||
|
|
||||||
//1
|
//1
|
||||||
instance1.PrivateDNSName = aws.String("instance2")
|
instance1.PrivateDNSName = aws.String("instance1")
|
||||||
instance1.PrivateIPAddress = aws.String("192.168.0.2")
|
instance1.PrivateIPAddress = aws.String("192.168.0.2")
|
||||||
instance1.InstanceType = aws.String("c3.large")
|
instance1.InstanceType = aws.String("c3.large")
|
||||||
state1 := ec2.InstanceState{
|
state1 := ec2.InstanceState{
|
||||||
|
Loading…
Reference in New Issue
Block a user